Problem with running two XL motors motors
As others have said, it's difficult know what is going without seeing your design. I would expect what you have described to work, but it is possible that your design is overloading the over current protection in the battery box.

PF battery boxes are designed to provide 800mA. Any more than this, and they have protection built in to cut power and prevent damage.

LEGO indicated that the XL motors draw 300mA under normal conditions, and Philo has the stalled current listed at 1800mA. A single stalled XL motor can overload the battery box, and two of them working hard can easily as well. See this answer for more information.

As a quick check, if you disconnect the motors from your car so that they can just run free, are they able to both run as expected? This should work fine and draw only 160mA if everything is connected and working properly. If not, one of your components must be performing abnormally or not be connected properly. As others have said, a photo would help us diagnose connection or build issues.