To Long for- It means to crave for something or to desire.
To Cast down- It means to make someone sad, lower someone's spirit, make someone downhearted..
To hit upon: to think of an idea when you didn't expect or intend to, especially one that solves a problem: