7 / 8 minus a minimalist fraction, 5 / 24 plus the same fraction, the results of two calculations are the same. What is the fraction?

7 / 8 minus a minimalist fraction, 5 / 24 plus the same fraction, the results of two calculations are the same. What is the fraction?

7/8-x=5/24+x
7/8-5/24=2x
16/24=2x
2/3=2x
x=1/3