$\log_{base} (y^p) = \log_{base} (base^{px}) = px = p\log_{base}(y)$
Here's what that looks like on a mapping diagram:
And here's a mapping diagram showing the product of the logarithm visualized as well:
Finally here is a dynamic visualization of the proof using mapping diagrams: