We are given that ABCD is a square with AB=12. Point P is inside the square and the distances to A,B and to the side CD are equal. We have to find this distance.

Now the distance of P from A and B is equal. Therefore we know that the perpendicular from P to AB cuts it halfway. Let this point be X, so that we have AX = BX = 12/2 = 6.

Now take the distance that we have to determine as Z. From the triangle AXP right angled at P we have Z^2 - 6^2 = (PX)^2. Also the distance from P to CD is Z. So PX + Z = 12

=> sqrt ( Z^2 - 6^2) + Z = 12

=> sqrt ( Z^2 - 6^2) = 12 - Z

square both the sides

=> Z^2 - 36 = 144 + Z^2 - 24Z

=> 24Z = 180

=> Z = 180/24

=> Z = 7.5

**Therefore the required distance is 7.5**