Explanation:
loga(x) calculates simply the exponent of a needed to get x as result.
so, 5 "to the power of the exponent of 5 needed to get 7" is 7 (we give 5 the exponent that it needs to create 7, so it creates 7).
the same thing with 2, where we give 2 the exponent it needs to create 1/49. so, it creates 1/49.
we get therefore
7 × 1/49 = 7/49 = 1/7