The song "The Way We Were" was written by Alan Bergman, Marilyn Bergman, and Marvin Hamlisch. It was performed by Barbra Streisand and featured in the 1973 film of the same name starring Barbra Streisand and Robert Redford. The song won two Academy Awards and became a commercial success, topping charts in several countries.
The film "The Way We Were" itself was based on a 1972 novel by Arthur Laurents, who also adapted the screenplay. The story drew from Laurents's college experiences and the political atmosphere of the time.
So, the song "The Way We Were" was written by Alan Bergman, Marilyn Bergman, and Marvin Hamlisch, while the film and its screenplay were authored by Arthur Laurents.