# [Physics] Direction of Friction on two stacked boxes

free-body-diagramfrictionhomework-and-exercises

I have box 2 stacked on box 1. Box 1 is on a frictionless table and accelerated by a force. However, there is friction between box 1 and box 2.

Now, I was told that this is the diagram for that problem:

I thought that since m1 and m2 are moving to the right, then the frictional force between box 1 and 2 will be to the left, opposite to the direction of motion. Can someone confirm what is the actual direction of friction for the frictional force between box 1 and box 2?

Also, is the action-reaction pair of forces between box 1 and box 2 the normal force of box 1 and the negative normal force of box 1?

It is the same issue with another problem I saw online:

In one of the free-body-diagrams, the friction seems to be going to the right (which makes sense since the movement is to the left), but in the lower free-body diagram the friction appears to be going to the right (in the same direction of movement). How is this possible?