∫ In square ∠ABCD, BD divides∠ ABC equally.
∴PG=PH
∠∠PGB =∠ABC =∠PHB
So in the rectangular BGPH, ∠GPH=90=∠EPF means ∠EPG=∠FPH.
Then it can be proved that △EPG and △FPH are congruent. The second problem is solved by Pythagoras in an isosceles right triangle, and the answer is √2(BF+BE)/2=BP.
P.S. If you don't understand, you can ask _