Example 6 A farmer contracts 2 hectares of farmland. According to his experience: if he plants rice, the yield per hectare per season is 6000 kilograms; if he plants peanuts, the yield per hectare per season is 1500 kilograms. However, the cost of rice is higher, requiring 3600 yuan per hectare per season, while peanuts only require 1200 yuan, and peanuts can be sold for 5 yuan per kilogram, while rice can only be sold for 3 yuan per kilogram. Now he can only gather 6000 yuan. How many hectares of each crop should he plant to maximize his profit?
Let $x$ be the hectares of rice planted, and $y$ be the hectares of peanuts planted, then
$$
\left\{\begin{array}{l}
x + y \leqslant 2, \\
3600 x + 1200 y \leqslant 6000, \\
x, y \geqslant 0,
\end{array} \text { i.e., } \left\{\begin{array}{l}
x + y \leqslant 2, \\
3 x + y \leqslant 5, \\
x, y \geqslant 0.
\end{array}\right.\right.
$$

Let the profit be $P$, then $P=(3 \times 6000 - 3600) x + (5 \times 1500 - 1200) y = 900(16 x + 7 y)$.
Set $16 x + 7 y = A(x + y) + B(3 x + y) = (A + 3 B) x + (A + B) y$,

then
$$
\left\{\begin{array}{l}
A + 3 B = 16, \\
A + B = 7,
\end{array} \text { solving gives } \left\{\begin{array}{l}
A = \frac{5}{2}, \\
B = \frac{9}{2}.
\end{array}\right.\right.
$$

Therefore, $16 x + 7 y = \frac{5}{2}(x + y) + \frac{9}{2}(3 x + y) \leqslant \frac{5}{2} \times 2 + \frac{9}{2} \times 5 = \frac{55}{2}$. And the equality holds if and only if $\left\{\begin{array}{l}x = \frac{3}{2}, \\ y = \frac{1}{2}\end{array}\right.$.

That is, planting 1.5 hectares of rice and 0.5 hectares of peanuts will yield the maximum profit.
!Note This problem is a linear programming problem.