The teacher will be very surprised to see your correct solution 😉
5*x + 12 = 8*x + 30
5*x+12 = 8*x+30
x = 18 / (-3)
sum
-6
=
product
x1 = -6
x1 = -6.0