The formula for the area, A, of a regular polygon in terms of the perimeter of the polygon, P, and the length of the apothem, a, is:

A=1/2ap

What is the equivalent equation when solving for p?

A: p=1/2Aa

B: p=2A/a

C: p=2Aa

D: p=A/2a