No, work done only cares about the start and the end. What happened in-between doesn’t matter.
In this case, the kinetic energy is 0 at the start and end, but the potential energy of the mass increased by mgh. 5 kg * 9.81 m/s2 * 2 m = 98.1 J (1 J = 1 N•m).
It’s not as easy as applying work = force * sloped distance, since she’s not simply accelerating the mass. If she did, it would have horizontal kinetic energy at the end. She’s stopping it too (well, the friction is stopping it, but we’re ignoring friction).













OP specifically asked about the sloped distance: