Look at example 1
You would see the difference between the values, the greater force would get the push in their direction.
3. 50 N left vs 40 N right
50N is greater which means the direction would be going left
50N - 40N = 10N
Solution: 10N left
4. 30N left vs 100N right
100N is greater which means the direction would be going right
100N - 30N = 70N
Solution: 70N right
(Do the same with the rest of the problems)