It's not that bad if you don't need an exact answer. Just convert to metric, multiply it out, and convert back.
https://motherboard.vice.com/en_us/article/qkvzb5/the-time-n...
The original problem requires plenty of conversions (to cubic inches) and memorization of infrequently used constants (how many cubic inches in a gallon?).
If imperial isn’t your thing, doing it in metric is easier, at least it was for me.