A phrase used by someone who is shifty and they want to express the notion that they have ulterior motives. Usually said at the end of their sentence.
This phrase was coined by Jon Lovitz playing the character Tommy Flanagan on SNL.
Bob: Where are you going?
Sally: (who is planning to ditch Bob) "I'm uh...uh... going to the restroom. Yeah, that's the ticket."
Bob: Ok hope everything comes out ok.
I'm growing 'vegetables' (marijuana). Yeah, that's the ticket