The correct answer is $\boxed{\text{B. 65\%}}$.
The efficiency of a machine is the ratio of the work output to the work input. In this case, the work output is the lifting of a load of 50 kg through a distance of 2.5 cm, which is $50 \times 0.025 = 1.25 \text{ J}$. The work input is the effort of 12.5 kg moved through a distance of 40 cm, which is $12.5 \times 0.4 = 5 \text{ J}$. Therefore, the efficiency of the machine is $\frac{1.25}{5} = 0.25 = 65\%$.
Option A is incorrect because it is the efficiency of a machine that lifts a load of 50 kg through a distance of 5 cm, not 2.5 cm. Option C is incorrect because it is the efficiency of a machine that lifts a load of 50 kg through a distance of 1 cm, not 2.5 cm. Option D is incorrect because it is the efficiency of a machine that lifts a load of 50 kg through a distance of 0.5 cm, not 2.5 cm.