Explanation:
sl = number of slides
sw = number of swing sets
sl > 3×sw
since we are dealing with integers here (there cannot be parts of slides or swing sets), this means
sl >= 4×sw
sl×168 + sw×275 <= 1250
(4×sw)×168 + sw×275 <= 1250
672×sw + 275×sw <= 1250
947×sw <= 1250
sw <= 1250/947
sw <= 1.319957761...
again, we are dealing with integers here, so, we need to round to the lower integer, and therefore, they can afford to buy only 1 swing set.
that leaves $1250 - $275 = $975 for slides.
how many ?
975 / 168 = 5.803571429...
again, we are only handling whole slides, and have to round down to the lower integer.
therefore, they can afford to buy 5 slides (which satisfies the criteria of "more than 3 times the number of swing sets").
so, they buy
1 swing set $275
5 slides $840 (5×$168)
-------------------------
$1,115
that leaves them with $1250 - $1115 = $135.