Derek had 3/7 as many cakes to sell as Julian. The two friends decided to share the work evenly. To do that. Julian gave 24 cakes to Derek. What was the total number of cakes?

(1-3/7)x = 24

Solve for x.