Let a be the number of counters in box A, b the number of counters in box B, and c the number of counters in box C.
"The ratio of counters in box A to box B is 5:3."
so a/5= b/3 and 3a= 5b
"The ratio of counters in box B to box C is 2:1."
so b/2= c/1 and b= 2c.
"Some counters are removed from box A."
Call the number of counters removed x. Now there are a- x counters in box A.
"54 counters are moved from box B to box C."
Now there are b- 54 counters in box B and c+ 54 counters in box C.
"There are now the same number of counters in each box."
a- x= b- 54 and b- 54= c+ 54.
We have four equations
3a= 5b
b= 2c
a- x= b- 54 and
b- 54= c+ 54
to solve for a, b, c, and x.