Pulling force `=3g-2g=g`
Total mass to be pulled `=3+2=5`
acceleration `a=(g)/(5)=(10)/(5)=2(m)//(s^2)`
Displacement of block in the first 2 s of motion
`s=ut+(1)/(2)at^2=0+(1)/(2)xx2xx2^2=4m`
Work done by the gravitational force
`W=30xx4+(-20xx4)=40J`