Let
A--------> the corner point in the graph 
B--------> the corner point in the graph 
C--------> the corner point in the graph 
D--------> the corner point in the graph 
we know that
The function P is equal to

Step 
Evaluate the function P in each corner point
point 

point 

point 

point 

the maximum value of P is for the point C

therefore
the answer is
The maximum value of the function P is 