See answer below
The horse and the cart have different forces acting on it.
The horse is exerting a force to the left and opposite to that, there is a tension force. Then there is the normal force acting from the ground to the horse and the weight of the horse consisting of mg.
The cart has different forces, however missing one. They have all the same as the other one but without a force. The is pulling the opposite direction of the other tension and there is also the Normal and the weight of the ground on the cart
The force the horse exerts to move the wagon s against the ground.
While it is true that the horse exerts a force on the wagon, Newton's third law states that the wagon exerts an equal and opposite force on the horse. We refer to these as internal forces (different arts of the horse-and-wagon system exerting forces on ach other). These play no role in making the wagon move.
Its like the classic case of a person reaching down to pull himself off the ground by his own bootstraps - it can't be done because one part of the object is exerting a force on another part of the same object.
If the wagon is to move, the horse must be able to exert a force against an external object, in this case the ground.