Excuse the correction, but "the square of x" should be typed as "x^2."
"x2" is ambiguous. Some people would interpret it as "x times 2," which is incorrect here.
Recall that "area of a rectangle = (length) * (width).
Here the area is x^2+5x+4, and the length of one side is x+2. How woud you determine the width of the rectangle?