Firms use more than one input (say labor L and capital K). Two questions arise: how to produce a given output as cheaply as possible, and how to choose inputs to maximize profit.
The Least-Cost Rule
To produce any given output at the lowest cost, allocate spending so the marginal product per dollar is equal across all inputs:
Intuition: if a dollar spent on labor yields more extra output than a dollar spent on capital, shift spending toward labor. As you hire more labor its MP falls (diminishing returns) and as you use less capital its MP rises — until the two "bangs per buck" are equal. Only then can no reallocation produce the same output more cheaply.
The Profit-Maximizing Rule
Least-cost production tells you the cheapest mix, but not the profit-maximizing amount. For maximum profit, hire each input until its marginal revenue product per dollar equals 1 — i.e. until each input's MRP equals its price:
The "= 1" is the extra condition: the first equality gives the least-cost mix; setting both ratios to 1 pins down the profit-maximizing quantities of each input (equivalent to MRP = price for every input, the 5.1 hiring rule applied to all factors at once).
Go Deeper: College-Level
Connection to isoquants and isocost (from 3.1)
The least-cost rule MPL/PL = MPK/PK rearranges to MPL/MPK = PL/PK.
This is the tangency of an isoquant (whose slope is the marginal rate of technical substitution, MPL/MPK) with an isocost line (whose slope is the input-price ratio).
So the least-cost rule is exactly the tangency condition for cost minimization, the production analogue of the consumer's MUx/Px = MUy/Py.