Let AP=m, AP: AB = Ah: AF = HP: BF.
m:√5=AH:2=HP: 1
Get AH=2m/√5 and HP=m/√5.
Then PM=4-(2-AH)=2+(2m/√5).
PN=4-PH=4-(m/√5)
So s rectangular PNDM
=PMxPN
=[2+(2m/√5)]x[4-(m/√5)]
=(-2/5)m^2 +(6/√5)m+8
When m =(-6/√5)÷(-4/5)=(3/2)÷5,
The maximum area is 12.
That is, when AP=(3/2)√5, the maximum area is 12.