a 40 kilogram barrel is rolled up a ramp 10 meters long to a height of 5 meters how much work was done?

M g H

Surely you have learned that by now.
H is the height, not the ramp length.