There were baseballs, tennis balls and softballs in a basket. 2/7 of the balls were baseballs. There were 21 fewer tennis balls than baseballs. The rest wer 54 softballs. How many balls were there in the basket altogether?

b = 2/7 * (b+t+s)

t = b-21
s = 54
Now finish it off