I had the following question on my last Algorithms test which I didn't know how to solve, and the the professor didn't agree to publish the solution. I would like to know the solution though, since it's been bothering me not knowing.
I am given two linear programs with the same variables- $P_1, P_2$, both in standard form and it is known that $P_1$ has an optimal solution. Write a single linear program for the following problem: Find among all optimal solutions to $P_1$ which satisfy the restrictions of both $P_1,P_2$, a solution that maximizes the objective function of $P_2$.