If $x+y=7$ and $x^2-y^2=21$, then what is $2x+3y$?
I solved it like this:
\begin{align} y& =7-x \\ x^2-(7-x)^2-21&=0 \\ x^2-49+14x-x^2-21&=0 \\ 14x&=70 \\ x&=5 \end{align}
Then I solved for $y$ and I got $2$. I plugged in the values of $x$ and $y$ to $2x+3y$, and I got $16$.
Is this correct?
Hint: A slightly easier way. $$x^2-y^2=(x+y)(x-y)=7(x-y)=21 \implies x-y=3$$ But your solution is correct.