Resultant force is nothing but the total force acting on a body including their directions. If the object is at rest or it moves with a same velocity, the resultant force should be zero. All forces are acting on same direction, resultant force should be the sum of all the forces.
In this case, two boys exert forces of 40N and 60N in opposite directions on an object. This means that one force goes with a plus sign and the other force goes with the minus sign.
That is, FR=F1−F2=60N−40N=20N.
Hence, a force of 20 N acts in the direction of greater force.