When I go on a trip with my friend(s), we usually split the cost of car rental and gas. I would pay for everything and at the end of the trip, I would just ask him for the money. If they don't have it then, they're usually good in paying me back later (and usually reminded me even if I forgot all about it lol)
Prior to this method, one of my pet peeves is taking turns in filling up the gas tank. Because when it's my turn, the tank seems to be completely empty. Yet they would fill up when the tank was only halfway done. I caught on to this practice eventually