Two Formulas and One Job
Figure 1 — The constraint removes a variable, the objective becomes a function of one variable, and the derivative locates the extremum. The endpoints still need checking.
The order is not negotiable. Students who differentiate first end up with a derivative in two variables and no way forward, then spend five minutes trying to repair a step that was never valid. The constraint is the entire content of the problem; the derivative is the routine part.