You could tell them just like you told us. The key is to remain polite and not to sound accusatory in any way. Something along the lines of:
Hey Bob, I'd like to talk to you about our carpooling arrangement. I have noticed that we've commuted a lot with my car lately, so I wanted to know if everything was okay with your car?
could introduce the fuel payment conversation. It gives them a chance to explain why they gave up on offering their own car to commute. This expresses your (maybe genuine?) concerns, and make them feel you're interested in their life and wellness (which is a good thing since you said your families are close).
If they imply that this is a temporary situation, ask them how long they think it's gonna last until the car is usable again. The key is to make them feel that 1) you feel their concern and then 2) you are yourself embarrassed by the situation.
If it's a temporary situation, then you could just say:
Oh, I'm glad it's gonna get fixed soon.
If the amount of time needed for the situation to get fixed is fairly short according to your standards, then there's no need to mention fuel expenses sharing. However, if you feel that it's a situation that's likely to go on for a while, then you need to ask for financial participation. Tell them you'd be happy to help them, provided they participate in gas expenses.
You could go with:
I'm sorry you're encountering issues with your car right now. I'd be happy to drive you to work every day until the fixes are done, and since your workplace isn't that far to mine, I'll be fine that we pay the same amount for gas.
Make it clear (but politely) that paying for gas isn't an option if they want to benefit from carpooling. Be gentle, but firm. This should suffice to make them understand you want them to get involved in the gas payment, but if they contest, you would tell them that you cannot afford to pay for gas that you don't have to use. You need to make it clear that paying for gas is to solve your issues, not theirs. This would not leave room for discussion and make it clear that you'd be happy to help provided they pay their due.
As Frarugi mentioned in comments, some people may be bothered by the idea of paying for gas and would be more inclined to accept if you instead mentioned a "returning the favour" policy. If your friend has their car blocked for 1 month, and so only yours can be used, then next month only your friend's car will be used for the commute. This does not make it seem like a "payment" for a service, but it is just like the "today mine, tomorrow yours" policy used until now, just on a bigger scale due to the "emergency", and also solves the problem of the friend saying "but your car consumes waaay more than mine".