I donīt think there is anything wrong with this solution. I like it.
You simply write the expression in quadratic form so to speak, so it will be easy to see its minimum value and for which x value.
There are several solutions to this problem.
Your method was one way.
The derivative is another.
Another I am thinking about is:
Here we know that for quadratic polynomials written in this way, the max/min are at the line of symmetry. Which is the cofficient in front of the x-term divided by -2. Which gives x=5.