Check the picture below.
since the line of length 8 and the one with length 10 are both parallels, that means the angles they each make with the slanted line are equal, the angles on the left are equal, same for the angles on the right, thus we get two similar triangles, the containing one and the inscribed one, as you see there, so
![\cfrac{x+5}{5}=\cfrac{10}{8}\implies \cfrac{x+5}{5}=\cfrac{5}{4}\implies 4x+20=25 \\\\\\ 4x=5\implies \boxed{x=\cfrac{5}{4}} \\\\[-0.35em] ~\dotfill\\\\ \cfrac{7+y}{7}=\cfrac{10}{8}\implies \cfrac{7+y}{7}=\cfrac{5}{4}\implies 28+4y=35 \\\\\\ 4y=7\implies \boxed{y=\cfrac{7}{4}}](https://img.qammunity.org/2024/formulas/mathematics/college/gb3kd8reexewl5fffpdrcdhzr2oztmnsr0.png)