Does a US citizen who has lived in Ghana for 5 years have to have 3 to 6 thousand dollars in hand to fly out of the country to return to the US?
If you type
romance scam into your favorite search engine, you will find several news stories and other anecdotes describing such scams. If you add
Ghana as a search term, you will find stories that resemble yours even more closely. Similar to advance fee scams, the basic method is to lead you to believe that you will get something that you want by parting with a reasonable amount of your cash. In that case, the purported benefit is even more cash, while in this case it is love.
A real US citizen can simply walk into the US embassy, say "I am stuck in Ghana and lack the money to get home", and the embassy will take whatever action is needed to get a passport replaced and front the cost of their plane ride home.
If there were exit fees, the embassy would settle those with the host nation too. Not their first rodeo.
To be clear, the embassies and this service are part of the US State Department, run by the Secretary of State, who there is a famous TV show about.
They will get a bill for the cost of this from the US Government. Like taxes, this bill cannot be evaded very effectively. When the bill comes in, contact the State Dept. itself through info on their website not the bill.
So as for your "friend", any claim that you need to send them money is bullpuckey. $5000 is definitely a scam, and the number is picked because their experience is Americans will find that number believable and will pay it.
The most they could need is a $200 gift card for Southwest Airlines and a $20 Potbelly gift card for a couple meals. The State Department gets you back to US soil, but does not fund domestic travel.