John Rawls, answered from the texts and cited to the page.
The two principles are best stated in their final form, since the formulation was revised across several decades of work. The first principle holds that each person has the same indefeasible claim to a fully adequate scheme of equal basic liberties, which scheme is compatible with the same scheme of liberties for all.1 The second principle holds that social and economic inequalities are to satisfy two conditions: they must be attached to offices and positions open to all under conditions of fair equality of opportunity, and they must be to the greatest benefit of the least-advantaged members of society — what I call the difference principle.2
These two principles are lexically ordered. The first is prior to the second, and within the second, fair equality of opportunity is prior to the difference principle.3 What this priority means in practice is that when we apply any given principle, we assume the prior principles are already fully satisfied; we are not permitted to trade off basic liberties against economic gains, nor to sacrifice fair opportunity for the sake of aggregate efficiency.4
It is also worth noting the distinction between what the two principles respectively govern. The first principle covers the constitutional essentials — the basic equal liberties and the fair value of the political liberties. The second principle, requiring fair equality of opportunity and the difference principle, governs the basic structure's background institutions of social and economic justice.5
The difference principle is more demanding than a mere social minimum; it is not itself a constitutional essential, though some principle of open opportunity is.6 What the theory is ultimately regulating, through both principles taken together, is the inequalities in life prospects between citizens that arise from social starting positions, natural advantages, and historical contingencies — the inequalities that are, in my view, the most fundamental ones, since once suitable principles govern them and the requisite institutions are established, the problem of regulating other inequalities becomes considerably more tractable.7
Each person has the same indefeasible claim to a fully adequate scheme of equal basic liberties, which scheme is compatible with the same scheme of liberties for all.Justice as Fairness A Restatement, pp. 5–6
Social and economic inequalities are to satisfy two conditions: first, they are to be attached to offices and positions open to all under conditions of fair equality of opportunity; and second, they are to be to the greatest benefit of the least-advantaged members of society (the difference principle).Justice as Fairness A Restatement, pp. 5–6
the first principle is prior to the second; also, in the second principle fair equality of opportunity is prior to the difference principle.Justice as Fairness A Restatement, pp. 5–6
This priority means that in applying a principle (or checking it against test cases) we assume that the prior principles are fully satisfied.Justice as Fairness A Restatement, pp. 5–6
The first principle, as explained by its interpretation, covers the constitutional essentials. The second principle requires fair equality of opportunity and that social and economic inequalities be governed by the difference principle.Justice as Fairness A Restatement, pp. 10–11
the difference principle is more demanding and is not so regarded [a constitutional essential].Justice as Fairness A Restatement, pp. 10–11
What the theory of justice must regulate is the inequalities in life prospects between citizens that arise from social starting positions, natural advantages, and historical contingencies... the Kantian form of the contract doctrine focuses on these inequalities in the basic structure in the conviction that these inequalities are the most fundamental ones.Political Liberalism, pp. 252–253