Finding an optimal solution to a linear program among solutions of another

Suppose $P_i$ is as follows:

$$\min c_i^Tx$$

subject to $$A_ix=b_i$$

$$x \ge 0$$

Let's write down the dual:

$$\max p^Tb_i$$

subject to $$p^TA_i=c_i^T$$

I would construct the following linear programming problem

$$\min c_2^Tx $$

subject to

$$c_1^Tx=p^Tb_1$$

$$A_1x=b_1$$

$$p^TA_1=c_1^T$$

$$x \ge 0$$

$$A_2x=b_2$$

Note that I have used duality theorem to ensure that the solution for the new system is an optimal solution to the first system.