Step-by-step explanation:
5x+15-10x=40 collect like terms
5x-10x=40-15. Subtract
-5x=25 divide both side by 5
x=-5.