The solid line from the mountain top is the path light takes to your eye. The dotted line is the apparent path and the dotted peak is what you see. Simply gaining some altitude and getting above the inversion is enough to get out of the mirage. Of course, if you're at the top of your service ceiling, the mirage should tell you to go someplace else. If you can't get above the inversion, the chances are better than average you won't be able to get out of the valley.
Mirages affect radar.
Bending of radar beams gives radar a longer useful range than is possible if light were used. My father used to point out that standing on the beach, we could see the tops of ships only if they were within around 15 miles offshore because of the curvature of the Earth. A straight line between the tops of the masts of tall ships fifteen miles out and our eyes would just brush the surface of the ocean. If the ship were farther out, the straight line would go through the water and we wouldn't see it. The range of a radar beam is around 300 miles simply because the beam is curved by the atmosphere.