How did SR-71 spy, flying at 80,000 ft and 3500 km/h?
The SR-71 Blackbird was equipped with specialized cameras. It would overfly the area of interest and take high-resolution pictures of the ground.

Of particular interest is the Technical Objective Camera (TEOC). It could shoot pictures with a 6'' resolution from the operational altitude of the SR-71. This task was not simple as the aircraft would have moved several hundred feet forwards during the exposure time of the picture which was (depending on the settings) around one or two tenths of a second. Without some kind of correction, this would have resulted in a picture that was blurry in the direction of motion of the aircraft.

To solve this, the velocity over height ratio number was fed to the camera, either manually as computed by the pilot or automatically as computed by the sensors and computer of the SR-71 (and it turns out that the machine did a better job at this than the pilot) and while the picture was taken, the high-precision mirror that directed the camera FOV downwards would rotate in the opposite direction towards which the airplane was moving, thus cancelling it out.