Let x = BP.
Now write expressions for AB and CP.
The function for the cost is y = 20(AP) + 10(CP).
Once you have written the cost function in terms of x, differentiate and determine the value of x that yields a miniumum.
x ≈ 57.735 ft
Note: This is not the answer to the question being asked.