jalexandre, 1) inside your parentheses you have a typo, and 2) that last line
does not show the intended expression substituted into the first equation.
It shows it substituted into an altered equation.
Literally substitute the expression into the first equation. Then clear parentheses
while it is there. Those x terms will already be together for combining like terms
together. As it is, you have more work to do, because you have to bring your
x term back over after it is freed up from clearing parentheses on the right-hand side.