According to the answer, the given problem is wrong.
The equation should be equated to 10 rather than 7.
This answer is wrong, assuming that you have managed to write down the correct equation that you were asked to solve.
The above equation is very different from the one that you were given.What I'm doing (More than likely wrong)
That last step is not valid. More generally, you have that in general .