The angle of pull is 12º + 10º above the horizontal so Fy = 120N•sin(22º)
is the component of the force in the vertical direction pulling against gravity.
Mechanical work is only done on an object when the force and motion are parallel.
Therefore the work is Fy times the distance in the vertical direction.
The cart moved 8 m (I assume 8 m is the distance parallel to the ramp) at 12º.
So the vertical distance the cart moves is Xy
sin 12º = Xy / 8 m ; Xy = 8m•sin(12º)
Therefore work = Fy • Xy = 120N•sin(22º)•8m•sin(12º) = 960•sin(22º)•sin(12º) N·m
You can't calculate work without at least 1 physics formula that W = F·d where f & d are parallel.
All the bold quantities are vector quantities.