Step 1: When one rear wheel sinks into mud, the normal differential sends most of the power to the wheel spinning freely in the mud, while the wheel on firm ground gets almost no traction. This is why the tractor gets stuck.
Step 2: Engaging the differential lock stops the differential from splitting torque unevenly and forces both rear wheels to turn at the same speed with equal traction.
Step 3: This equal traction on both wheels lets the wheel on firm ground pull the tractor out of the mud. Brake lock, flywheel lock and hydraulic lever lock have no role in wheel traction distribution, so option 2 is correct.