<s>[INST] How to get the inverse of this function, when we have qudratic? $$f(x)=-x^2+6x-5$$ 
How do I find the inverse? I tried by making it 
$$y=-x^2+6x-5$$
Then swapping $y$ with $x$, and then solve it for y, but I got $y^2$.
The domain is $x$ greater or equal to $m$, and in this case $m=5$.
After that we need to find the domain of the inverse.
 [/INST] Note that
$$
\begin{align}
y
&=-x^2+6x-5\\
&=-(x^2-6x+9-9)-5\\
&=-(x^2-6x+9-9)-5\\
&=-((x-3)^2-9)-5\\
&=-(x-3)^2+4
\end{align}
$$
by completing the square so that
$$
4-y=(x-3)^2\iff \sqrt{4-y}=\lvert x-3\rvert
$$
But $x\geq 5$ so what can you conclude? Solve for $x$.
</s>