A road trip with these parameters
The cost of gas is ...
... (2240 mi)/(28 mi/gal)·($3/gal) = $240
The cost of lodging is
... ($85/day)·floor(2240 mi/(650 mi/day)) = $85·3 = $255
Total cost of gas and lodging is $240 +255 = $495.
The cost for a 1/4 share is $495/4 = $123.75.