Complex sentence: Hammerstein died in August 1960, before the film was made, so when Rodgers wrote two extra songs for the film, he wrote the lyrics as well.
Split into simpler sentences: Hammerstein died in August 1960, before the film was made. So when Rodgers wrote two extra songs for the film, he wrote the lyrics as well.