We have similar triangles, so equal ratios
5:7:8 = 5+x : 7 + y : 10
Equal ratios mean the corresponding pairs are related by constant factor f,
So f= 10/8 = 5/4 and
5f = 5+x
x = 5(5/4) - 5 = 25/4 - 20/4= 5/4
7f = 7 + y
y = 7f - 7 = 7(f - 1) = 7(5/4 - 1) = 7/4
Answer: x=5/4, y=7/4
Check:
5/4 + 5 : 7/4 + 7 : 10 = 5+20 : 7+28 : 40 = 25:35:40 =5:7:8 good