I would like to know if this is ok.
Let $f(x)=x^2-8x+4$ with $x\in[4,\infty)$. Show that $f$ is one-to-one.
If,
$$f(a)=f(b)$$ $$a^2-8a+4=b^2-8b+4$$ $$a^2-8a=b^2-8b+4-4$$ $$a^2-8a=b^2-8b$$ $$a(a-8)=b(b-8)$$
Therefore, $$a=b$$
Therefore,$f$ is one-to-one.
Thanks for your time.
Here, it is not sufficient to conclude $a=b$, for example, $a=0, b=8$, so you need to use the domain $[4, \infty)$ to exclude the cases such as $a=0, b=8$.
Go back to this step, instead, you can factor it in this way,
$$\begin{align}a^2-b^2&=8a-8b\\ \\ (a+b)(a-b)&=8(a-b)\\ \\ (a+b-8)(a-b)&=0\end{align}$$
Can you proceed from here?