I tried to solve the following equations:
$$-w^2 + 11w -11/2 = 10(w-P)-(w-P)^2$$
First, I got rid of the brackets and ended up with the following equation:
$$w-11/2 = 2wP-10P-P^2$$
And now I am stuck. How do I solve this equation for P as a function of w? The right answer should be this:
$$ P(w)= \sqrt{ (11/2-w)^2+1/4}-(5-w)$$