Free Space Loss
In free space loss, there is no sense of height. In order for height to be relevant, it needs to be relative to something. That something is typically a flat surface, or the earth, or something along those lines. However, when using a free space model, you are assuming there is nothing around you, thus nothing for the heights to be relative to.
I think you might understand this better visually. This drawing is exactly the same as your question, you are attempting to find RX5 Power. I don't want to work your homework for you, so I won't give you the exact equations or numbers. But you should be able to figure it out from my description.
The trick here is that you should try to figure out TX power first. With gains equal to 0 dB, this becomes a very simple problem. A 0 dB gain antenna means that it outputs exactly the same power that was input into it. In linear equations, 0dB gain is the same as multiplying by 1. Because of this you can ignore the antennas.
Just plug all of your information into the free space loss equation and you will be left with 1 unknown. Simply solve for your 1 unknown and this is your TX power. Now that you have the TX power, you can simply plug all of the new numbers into the free space loss equation to be able to obtain the RX5 power, simple as that.
Free Space loss is the simplest way to compute how strong a signal will be at a given distance, but it is not very accurate once you get to the real world. Because of this, things like the flat earth model and exponential propagation model have come about.
The exponential propagation model is essentially the exact same as the free space loss model, except instead of being proportional to 1/distance^2, you can set it to be something like 1/distance^4. This adds in some extra loss to help account for things like trees and any other object that may be in your path. The same concept I presented before for your homework could be reused here, just change the equation you are using. This model still doesn't take into account heights. However, if you want to think outside of the box, the value you use for the exponential will change some depending on your heights. The higher you are, the closer you are to free space lose, while the lower you are, the more object are in your way and so a higher exponential should be used.
The flat earth model takes into account the reflections that will be received off of the earths surface. This is when the height of the antennas comes into play. The reason for this is that the angle that you will hit the earth will be dependent on the height and will result in differing reflections depending on the heights.
The rf line of sight is another situation where the heights of the antennas will come into play. The concept is similar to your own line of sight. Someone standing on top of a building can see further than someone sitting on the ground.