EASY!--Do the math
40 miles at 5 knots means about 8 hours under way. The unknown is you gasoline consumption, measured in gallons per hour (GPH). To go 8 hours on 18 gallons (with a reserve remaining) means using 2.2GPH or less. My 27, with a 15HP 2-stroke OB (notoriously thirsty mother!) burns about 1.2 GPH at 5.5 knots. A4s are a lot more fuel efficient, like .8-1 GPH maybe. You should be able to do your 40 miles, and return, on 1 fill-up. Sometimes, if I think I may be close to maximum distance for my tnaks, I carry a 5-gal jerry can of gas lashed to the lifelines and shrouds.