I was going to respond to this earlier when it was posted by Kensuke but changed my mind given how long ago that was. Since it's come back around, here's my two cents (FWIW)..."Honestly, this is why you need a fire extinguisher in your car. Preferably one that can tackle both chemical and electrical fires. It's not just for ricey looks. "
The prudent thing to do is get away and call the fire department. Personal safety first. A fire as bad as depicted here will not easily be extinguished with a hardware store fire extinguisher. The risk of explosion is also very real.
You might have better luck trying to blow out a road flare.