After the part where the rectangles are rearranged, it says: "still has area p^2 +px=q...".
It should be x^2 instead of p^2.