You’d set up a proportion. I did 25/15=7x-40/18.
Then you would cross multiply to get 15(7x-40)=450
Distribute the 15.
105x-600=450
Add 600 to both sides, so the -600 cancels out.
Then you’re left with 105x=1050
Divide both sides by 105 and you get x=10