<s>[INST] how to solve $x^2 = 3x + 4$ I am a programmer in the eighth grade taking algebra 1. I am only about a month into the school year, and I need to know how to solve something similar to this equation:
$x^2 = 3x + 4$
However, the problem is that whenever I try to get the square root of both sides of the equation to get rid of the $x^2$, I get something like this:
$x = \sqrt{3x + 4}$
After this, I couldn't figure out what to do, because my only option was to square both sides of the equation, which would get me back where I started. So, how would I solve this? Please make the answer simple enough so that an algebra 1 student would understand. Also, sorry for the tag that probably isn't  great, my rep is so low I cant create a new tag (I would probably tag this as algebra 1).
 [/INST] The standard method is to multiply everything by $4$ and transfer the $x$ term on the left-hand side:
$$
4x^2-12x=16
$$
Now recall $(a+b)^2=a^2+2ab+b^2$ and observe that we can take $a=2x$, so from $2ab=-12x$ we obtain $4bx=-12x$, that's satisfied for $b=-3$. We need the $b^2$ term, so we add it on both sides:
$$
4x^2-12x+9=16+9
$$
The left-hand side can be rewritten $(2x-3)^2$, so we are reduced to
$$
(2x-3)^2=25
$$
that gives us
$$
2x-3=5\qquad\text{or}\qquad 2x-3=-5
$$
A different strategy is to set $x=t+a$ and try to determine $a$ in such a way that some term vanishes:
$$
t^2+2at+a^2=3t+3a+4
$$
If we set $2a=3$, the $t$-term disappears:
$$
t^2+\frac{9}{4}=\frac{9}{2}+4
$$
and so
$$
t^2=\frac{25}{4}
$$
and therefore $t=5/2$ or $t=-5/2$. Thus
$$
x=\frac{5}{2}+\frac{3}{2}
\qquad\text{or}\qquad
x=-\frac{5}{2}+\frac{3}{2}
$$
You'll learn the “quadratic formula” that can be obtained in the same way as the first method above: if $ax^2+bx+c=0$, then
$$
x=\frac{-b+\sqrt{b^2-4ac}}{2a}
\qquad\text{or}\qquad
x=\frac{-b-\sqrt{b^2-4ac}}{2a}
$$
provided $b^2-4ac\ge0$. In your case $a=1$, $b=-3$ and $c=-4$.
</s>