When the two vectors are in the same direction, their resultant is simply given by the sum of the magnitudes of the two vectors. Therefore, we will have:
Vice-versa, when the two vectors are in opposite directions, we have to consider one of the two vectors as being negative: therefore, the resultant will be given by the difference between the magnitudes of the two vectors. Therefore, in this case, we will have:
Box 1 (having a mass of 10 kg) will slide first as it has less inertia than the other box. It will also require less force to overcome static friction between the surface of the plank and that of the first box.