2. When point P moves to point B, AQ=QD, and △ADQ is an isosceles triangle. This is because the diagonal of the square is bisected vertically, so △ADQ is an isosceles right triangle at this time.
When point P moves to point C, AD=DC(DQ) and △ADQ are isosceles triangles.
3) It is known that AP+AG=a+b= 1.
With ∠DAP as the right angle, the square of the side of the square PEFG is equal to PA 2+AG 2.
From the known square area, we can know that PA 2+Ag 2 = 2/3, that is, A 2+B 2 = 2/3.
From a+b= 1 and a 2+b 2 = 2/3.
(a-b)^2=2/3- 1/3= 1/3