Nicholas H. answered 03/15/19
Medical Student for Physics and Chemistry Tutoring (MCAT)
Newton's 3rd law holds in both cases. In the first, when your friend exerts force A on you, you exert force B on them, where B=-A. But because the forces acting on you only include A and whatever force you apply to balance yourself, you will likely accelerate according to F=ma. Now your friend knows that he/she is about to exert a force, and having experienced Newton's laws, his/her body will naturally brace itself for the resulting force that acts on them (the reaction force). Thus the total force acting on their body is much less than the force acting on yours.
In the second question, the mass m1 experiences forces due to gravity (which m1 also exerts on the Earth) and the tension force from the rope. m1 exerts an equal force on the rope, but because we only care to consider forces acting on a particular object, we can set up our system: m1g-T=m1a; -m2g+T=m2a (notice I changed the signs to account for the different reference frame on the other side of the pulley). You could also find the forces acting on the rope, by each of the two masses, but that is not a very interesting result since the rope is assumed to be massless. Overall, the misunderstanding you seem to have is that you are considering the two forces as isolated and canceling each other out; however, the two forces are rarely isolated and act on two separate objects which causes both objects to accelerate according to Newton's 2nd law.
A good example to visualize this is to imagine a person laying on a flat bench and doing a bench press. Gravity exerts a force on the weight and the weight exerts the same force on Earth. The person exerts a force on the weight and the weight exerts the same force back to the person. The person exerts a force on the bench which exerts a force back on the person. And the bench exerts a force on the Earth which exerts a normal force back to the bench. So if you consider the one movement at constant speed, you have the weight feels gravity and the force of the lifter which has no net acceleration. The lifter feels the force of the weight pushing down (equal to the force exerted by himself), and the force of the bench which cancel each other out. The bench feels the weight of the lifter and the force he exerts on the weight and exerts that force onto the ground. The ground exerts a normal force which keeps the whole system balanced.