To find the distance from observer's point A on one side of a river to a point P on the other side, a line AP' measuring 2,540 feet was laid out on one side and the angles P'AP and AP'P were measured and found to be 47degrees20' and 78degrees10', respectively. Find the distance from A to P.