The condition of the maximum energy transfer is when the moving weight stops on the collision with the obstacle, so that all kinetic energy is passed to the obstacle.
What's given here is the initial energy of a weight, say E, which is going to be the same for both heavy and light weight. Let's assume that the mass of the weight is M, the mass of the obstacle is m and the speed of the obstacle after the collision is v. (The speed of the weight after the collision is zero).
Then, the initial speed of the weight is sqrt(2E/M).
For the full transfer of the kinetic energy to occur on collision, the following equations should hold:
momentum: M*sqrt(2E/M)=mv
KE: E=mv^2/2
The solution here is m=M, which is kind of expected.
So the answer to the question is that the setup where the mass of the weight is equal to the mass of the obstacle will impart most (all) energy on the obstacle. The displacement, of course, will depend on the friction.