If you have a good antenna, and the height is correct then 5 watts will work fine--assuming that there is no other interference. Going to the line of sight calculator, it shows that each antenna would have to be 120 feet high on flat terrain, to get 30 miles. (each antenna would have a radio "horizon" of 15 miles. If you or the receiving station were on a mountain, without any obstructions that would work--if he was about 240 higher than you are. Often there is some bending of the radio waves, or there can be tropospheric ducting, which will give longer ranges, with shorter antennas. I have communicated with another ship as far as 320 miles way with 25 watts on a VHF frequency, due to the ducting (or bouncing the radio wave off layers of the atmosphere.--don't count on it.)
The ground wave on 160 meters and 80 meters often can be 30 miles--but as noted you have to have a HAM license.
GMRS radios have a Max. power of 50 watts, so with a radio such as the Midland - MXT400, 40 Watt GMRS MicroMobile you will have maximum range (with a good antenna) and license, without a test. Unfortunately this is not a hand held radio, but can be very portable, with a battery pack.
In November 1983 I made contact with Owen K. Garriott, W5LFL, aboard STS-9 using a hand held 5 watt Yaseau 2 meter radio, with a specialized antenna. Garriott was just using the standard antenna on his portable Motorola 2 meter radio. The exchange was brief, just an acknowledge of call sign reception. I was on the deck of my sailboat, and he was about 155 nautical miles above the earth in space.