Let's define what we know and what we don't know.
Let r = room and board costs
Let r + 4000 = tuition costs (tuition is $4000 more than room and board)
Let 500 = other costs (fees and charges)
Let 24500 = total costs
Now, let's add all this up to the total costs:
r + r + 4000 + 500 = 24500
How's that look?
Solve for r to get room and board costs. Then add 4000 to get your tuition costs