When solving the problem 7^x+2=7(3x)-8, your friend does the following:

7(x)+2=7(3x)-8
7x+2=21x-8
10=14x
x=5/7
was this correct?

yes, this is correct. No error was made.
when the bases are the same, then we can set the exponents equal to each other and solve that equation
Both sides should be divided by 7 instead of multiplies by 7
The 7 needs to be distributed across all terms when solving

However, in this case, your friend's solution is correct. The distribution of the 7 is not necessary because the 7(3x) term is already fully simplified.