# Modelling question using completing the square

In this example, the maximum possible number of mosquitoes was solved using completing the square.

Is there any other methods to solving this? How do I exactly recognise and know which formula to apply for modelling questions like this?

It's hard to answer such questions when we aren't given any context. I have several answers in mind, but they each depend on what you already know. Just taking a stab: The function $m=-r(r-4)= -r^2+4r$ is quadratic and its graph is a parabola. Since the leading coefficient is negative, we know it's parabola with arms pointing down. So the maximum of the function is at the vertex of the parabola. The usual way to find the vertex is by completing the square, as was done in your example.
Other ways are by taking the derivative $\frac{dm}{dr} = -2r+4$ and setting it equal to zero. When you solve, you get $r=2$, which you can plug back into the function to get $m=4.$