"The Cowboy Rides Away" is a song written by Sonny Throckmorton and Casey Kelly, and recorded by American country music artist George Strait. It was released in January 1985 as the second single from his album Does Fort Worth Ever Cross Your Mind. It peaked at number 5 on the United States Billboard Hot Country Singles chart, and at number 3 on the RPM Country Tracks chart in Canada. It is the song used by Strait to close out his performances. This is also the name of his last and final tour commencing January 18, 2013.

Based on this passage, who wrote the song the cowboy rides away? Let's give stream of consciousness first:
The relevant sentence in the passage is: "The Cowboy Rides Away" is a song written by Sonny Throckmorton and Casey Kelly, and recorded by American country music artist George Strait.
So, the final answer is Sonny Throckmorton and Casey Kelly.