I have a question about how can i use the "rectangular diagram" to convert the general form of quadratic function to the square (Factor the quadratic function) :

Actually, i don't know how to find the middle term in the trinomial. For instant :

x^2 - 22x + 121

so we have

But i don't know how can i find the "a" and "b" . And i know that a + b = -22 and ab = 121 .