The easy way to get wax, either from crayons or candles out of a carpet, is to put thick paper over it and heat briefly with an iron. The wax melts, and the paper absorbs it. Depending on the amount of wax, you may have to repeat a few times to get it all out.
Be sure not to touch the carpet directly with the iron as some carpets can melt.
Once most of the wax is gone into the paper, you can wash with soapy water and get the last bit out, especially if it is soy wax.
The hardest part to do this in cars is getting the iron close enough to the vehicle…you can use an inverter from the car cigarette lighter outlet. These inverters work for laptops too!