This post takes a different approach to explaining telephoto compression that does not rely on our perception of depth in an image, but is grounded solely in mathematics and optics. The results can also be confirmed by experiment, no personal judgement is required!
Linear Perspective
A pinhole camera creates images as shown in the diagram below:
The pinhole is at the centre of perspective, also called the centre of projection. This type of perspective is called linear perspective when used in works of art such as paintings and drawings. Simple geometry gives us the basic equation that characterises linear perspective:
object size / object distance = image size / image distance
A camera with a rectilinear lens creates exactly the same perspective, the image distance now being the focal length of the lens, so we can rewrite the equation as:
object size / object distance = image size / focal length
Telephoto Compression
By the above equation, if the object size and distance remain the same, increasing the focal length will cause the image size to increase in proportion.
On the other hand, if the object distance is varied while keeping the focal length and object size unchanged, then the image size will vary in inverse proportion to the object distance.
Hence, multiplying the focal length by a factor, n, has exactly the same effect on the image as dividing the object distance by the same factor, n. If the scene contains objects at different distances, each object distance must be divided by n.
In other words, increasing the focal length produces an image that is exactly the same as one in which all object distances have been compressed by the same factor as the focal length was increased by. This effect is commonly called perspective compression or telephoto compression.
An Example
Consider the effect of changing the focal length from 50mm to 100mm. This will double the size of the image of every object in the field of view. So the photo taken at 100mm is exactly the same as the photo taken at 50mm magnified by 2, but with a smaller field of view.
However, the photo taken at 100mm focal length is also exactly the same as a photo taken at 50mm focal length but with all object distances halved. Suppose the 100mm photo is of two objects at distances of 100m and 50m from the lens. If we take a photo using 50mm focal length with these two objects placed at 50m and 25m from the lens, we should get exactly the same image (assuming the two objects appear on a featureless background).
To make it easier to do this experiment, I have used two matchboxes at 100cm and 50cm distance for the photo with 100mm lens (on the right) and the same two matchboxes at 50cm and 25cm for the photo with the 50mm lens (on the left). My measurement of distances was very approximate, but the two shots are nearly identical (ignoring the background, which I could not easily move).