You should learn the general principle backward and forward.
You use it forward for your first problem and backward
for your second one.
The base of the exponent, B, is also the base of the logarithm.
The other two, A and C, switch being written closest to base B.
Edwin