Proof limit by definition 
Prove: $\lim_{x \to 2}x^2=4$

We need to find $\delta>0$ such that for all $\epsilon>0$ such that if $|x-2|<\delta$:
$$|x^2-4|=|(x-2)(x+2)|=|x+2|\cdot|x-2|\implies|x-2|<\frac{\epsilon}{|x+2|}$$
We will take $\delta=\frac{\epsilon}{|x+2|}$
is it valid?

You can cheat a little bit, as long as it doesn't appear in your final solution: At $x = 2$, the derivative of $x^2$ is $4$. That means that $\delta$ must be, for small $\epsilon$, less than $\frac\epsilon4$.
For small $\delta$, $x$ is close to $2$, which makes $|x+2|$ close to $4$. That means you're on the right track, but you have to eliminate the $x$ from that expression in some way, probably by saying something like $\delta = \min(\frac14, \frac\epsilon5)$. (I am quite certain that this is good enough, by the way, but you would have to check it; I only went with what felt right here.)
