The following animation illustrates the logarithm of Q to the base P:
A Java-enabled browser will allow you to see the animated solution. Since Q = 7P, the logarithm of Q to the base P is 7.
P + 6P is 7P = Q, thus 7 is the base.