Two persons, A and B, together have $6 less than a third person, C. If B gives $5 to A, then A will have half as much money as c does. If A gives $5 to B, then A will have one third of what c has. How many dollars has each?

a+b = c - 6 , #1

if b gives $5 to a
then a+5 = (1/2)c
2a + 10 = c , #2

if a gives $5 to b
then a-5 = (1/3)c
3a - 15 = c , #3

which means 3a - 15 = 2a+10
a = 25
then c = 2a+10 = 60

back in #1
a+b = c-6
25 + b = 60-6
b = 29

A has $25, B has $29, and C has $60

check:
A and B together have 54 , which is $6 less than 60, check!
B gives $5 to A
A now has 30 which is 1/2 of $60 (C's share) , check!
A gives $5 to B
A now has #20 which is 1/3 of $60, check!

My answer is correct