It would depend on weather, motor, prop and altitude. If you live in a country with laws governing altitude or line of sight flying then you would be potentially breaking both those laws to get that distance. You would also need long range radio like the TBS Crossfire, GPS flight control and high power VTX to manage that.
The Legacy is not designed for super high efficiency long rage flying, you would want a big wingspan plane like the explorer for that. It can take a pretty large battery but that is a very long flight.
Download a fitness app that will track how far and where you walk. There are plenty out there for both Android and apple. Put your phone in your Legacy with a 2200 3s battery, and fly it till you have to land it. Check your app and see how far it went. This test doesn't really matter how you fly, just do circles around your flying field. If it says you went 6 miles total, then you could do some simple math to figure out what size batteries you need. I'd imagine the Legacy could hold quite a few batteries.
But I agree with what was stated above. I'd pick a more efficient air frame like the Explorer. I have a Racerstar 2830 motor with a 9x5 prop on a 3s 2200 and I get 15+ flight times with it. I'd bet it could get 8-9+ miles out of it. The explorer also has plenty of room for large/muliple batteries.
The trickiest part of flying distance like that isn't so much batteries as it is your video signals and transmitter/receiver signals. 18 miles requires some seriously powerful equipment. Not to mention the risk of losing signal and losing your plane is MUCH higher.
I do remember seeing a video about a year ago where a guy used some sort of cellular network to fly and FPV his plane. It was somewhere in Hawaii and he flew along the coastline for some retarded distance. He had to use some sort of flight controller to assist as there is lag with cellular networks.
And lastly, like stated above, you might wanna check the laws where you live. There's a high chance you'd be breaking the law to fly that distance.