long range communication

I want to send data from one arduino or raspberry pi to another arduino. and the distance between them is around more than 5 kilo meter. So how can i do this i do not want to use internet and GSM module. I want to make a project to send data over long rage without internet. So anyone can suggest me which module and what technology i should use, thank you.

the environment can be any, and the device will always be in a person hand so you can consider the height. I want to send the messages(ex:- i am in usa, where are u) and few data(float and integers) so the data can not be greater than 50 bytes so the data rate i require 50 bytes/sec. I am thinking to use this device in any environment like in urban or hilly areas.

how much data how fast? what is the environment, e.g. urban, open fields, etc? do you have line of sight?
Lora is suitable for long distances and there are high power XBEE modules

The range you will get from a system will depend on the environment, you need to describe what is between the transmitter and receiver.

A particular system may be capable of 700km + ground to high altitude balloon, but with the same system and antennas the range could drop to 500m or less in an urban area.

The type of antennas used and their height above ground can have a significant affect as can where you are in the world as this constrains what you can legally do.

You need to provide a much more complete explanation of what you are wanting to do, in particular how much data you want to send and how fast you want to send it.

the environment can be any, and the device will always be in a person hand so you can consider the height. I want to send the messages(ex:- i am in usa, where are u) and few data(float and integers) so the data can not be greater than 50 bytes so the data rate i require 50 bytes/sec. I am thinking to use this device in any environment like in urban or hilly areas.

Rockblock MK2 works just about anywhere on Earth, except indoors.

If the environment is any, 5km in hilly or urban areas, even LoRa will struggle at low data rates and legal levels of power with handheld devices.

So it looks like satellite is the only practical alternative.