The clever advice Dustin Hoffman gave Geena Davis to shut down Jack Nicholson's advances