This problem is a bit tricky. They are mixing mass and weight and hoping you'll notice.
The gravitational potential is given by \(U=m g h\)
where g is the acceleration due to Earth's gravity and is 9.8 m/s2
But you have to be careful in that \(weight=m g\)
So in calculating the potential here we have to sum up all the weights and multiply them by the height.
\(TotalWeight = 4 \times 1000 \times g + 6 \times 150 =\\ 4000(9.8) + 900 = 40100 n \\ \mbox{and so the potential is}\\ U=112\times 40100 = 4491200 J ~~~~~\mbox{(J is for Joules.)}\)
.