A rectangular field is twice as long as it is wide. Express the area of the rectangle as a function of the perimeter, P.