How can the friction force equals to the net force in this momentum question? Question- from https://www.physicsclassroom.com/calcpad/momentum/prob29.cfm 
A physics student hurls a $315-g$ ball directly into a $3.54-kg$ box which is at rest on a table top. The baseball strikes the box with a pre-impact speed of $54.1 m/s$. The box is filled with towels to help absorb the blow and effectively catch the ball. The coefficient of friction between the box and the table is $0.714$. Determine the distance which the ball and box slide across the table after the collision. 
My workings: 


*

*First, I use the Law of Momentum conservation which states that the change of momentum of the 1st object is equal and opposite to the change of momentum of the 2nd object, to find the final velocity of both of the object. The velocity after the collision is $4.42m/s$
My question: This is the part where I got stuck on, I know I need to use one of the kinematic equations which is $v^2=u^2+2as$ and solve for $s$. To do this, I am just missing 1 value which is the acceleration $a$. I tried to find it but I couldn't. So, I decided to look for some hints. According to the answer, it said in order to find the acceleration, I need to equate the friction force to the net force. I couldn't see how can you equate the friction force to the net force that is $f net = f fric$, $ma=μ fn$ But how? I do not understand, I thought friction is a force opposing the applied force?
 A: The system that you are considering is the box and ball.
After they collide the box and the ball have a certain amount of kinetic energy,
Assuming that the table is horizontal, the only horizontal force on the box and ball is the frictional force and it is this frictional  force (the only force in the horizontal direct and so the net force) which slows the box and ball down.
You can use Newton’s second law $F=ma$ to find the horizontal acceleration. 
A: Frictional force is given by $F=\mu N$, where $\mu$ is the coefficient of friction and $N$ the normal contact force ($mg$).  Hence, the acceleration (deceleration) is just $\mu g$.  Substitute this into the equation and you will get it.  Do note that the force during the collision is temporary, only to set the box to motion.  After that, it is only frictional force slowing the block down.
A: 
I thought friction is a force opposing the applied force?

For static friction, that is true.  As you apply a sideways force to a static object, the friction force increases up to some maximum value.
But kinetic friction is found whenever there is relative motion between objects.  Even if there is no (horizontal) applied force, the frictional force appears to oppose relative motion.  In your case, a kinetic friction will appear.  As there are no other applied forces, it will be equal to the net (horizontal) force.
