The whole concept of green screen or using a colour matte to isolate a subject and then superimpose that subject into a new scene to make a final composite has been around for decades before the first computer, so how did they manage to pull this incredible technique off?
Well, back in the day the post-production technique made use of many different types of chemicals and exposures to get the desired effect, and a lot of these chemicals would react to colour information differently within the film.
What was commonly done back in the day was to put a subject in front of a white background that was lit by a sodium vapour lamp which only emitted one frequency of light. This allowed for a special kind of camera to record two rolls of film simultaneously. One that would capture only this frequency, and another that wouldn't record it at all which allowed for "green screening" in post-production.
Take a look at the video below by the YouTube channel: Tom Scott on How Did Green Screen Work Before Computers?...