To do something that is likely to cause problems later. That kid isn't bullying you, so if you tattle on him to the teacher, you're definitely buying trouble.
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
Fig. to encourage trouble; to bring on trouble. (As if certain acts would pay for or cause difficulties that would have to be suffered through.) I don't want to buy trouble. I have enough already. Saying something insulting to him is just buying trouble.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.