Bob weighs $B$ kg and when he steps on a scale, the spring inside gets compressed by $c$ meters. Assuming the scale obeys Hooke's Law, if Alice weights $A$ kg, how much work is done compressing the spring when Alice stands on the scale?
There is obviously a flat surface serving as the interface between the spring of the scale and the part of the scale Bob and Alice step on. For simplicity, I will assume that this interface has no mass, so that the only forces acting on it are the weight of the person and the spring force.
When Bob is on the scale, the interface moves an amount $c$ at which point the spring force equals Bob's weight, i.e. $B = kc$, where $k$ is the spring constant. Solving for $k$ yields $k = B/c$.
When Alice is on the scale, the interface moves until the spring force equals Alice's weight. If we call the displacement the interface undergoes $d$, then $A = kd = (B/c)d$, hence $d = (A/B)c$.
The work done by Alice's weight to move the interface $d$ meters is $Ad$. The work done by the spring force to move the interface $d$ meters is $\int_0^d kx \cdot x \, dx=kd^3/3$. The net work on the interface is therefore $Ad - kd^3/3$.
Apparently I am wrong because the answer is $Ad/2$. Where did I go wrong here?