run for one's money, (give) a
A close contest or strong challenge; to give a good return for one’s expense. This term may come from the racetrack, where it is used to describe deriving pleasurable excitement from a horse race even if one does not win all one’s bets. The term appeared in a dictionary of slang in 1874 and has been used ever since. “They have had what is called in some circles a good run for their money,” reported the Pall Mall Gazette in 1889.