Your teacher is right that the force exerted on the truck and the car are equal, according to Newton's 3rd law.
However, you are not wrong in thinking that, in order for there to be an acceleration, there needs to be a net force. When the truck pushes back on the car, that does not detract from the force that the truck feels; in other words, when the truck exerts a force on the car, that force is NOT included in the truck's free-body diagram.
Following this, the truck is happily accelerating because it has a net force on it. The car is also accelerating though, right? It has a force being applied to it in the opposite direction, so there must be some other force to offset that. That force is from the wheels on the pavement, pushing the car forward like you are used to.
Note that the force exerted by the car on the truck (--1-->) and the force exerted by the truck on the car (<--1--) are equal and opposite, following Newton's 3rd law. Force 2 is the car pushing against the ground.
Note: In this case, we do not need the net forces on the car and truck to be equal to each other. In fact, since they are accelerating at the same rate, and the car has a smaller mass, the net force the car feels will in face be smaller than the net force the truck feels.
so we get