Remark
What exactly do you want? You have written the equation. So perhaps what you would like is the value for x.
When people start doing algebra usually they are asked what multiplied by 8 will give 40. There is no procedure to that, just an answer.
8 times 5 = 40. So the answer is 5.
You do know that 8x means 8*x or multiply 8 times x do you not?
Procedure
8*x = 40 Divide both sides by 8
8x ÷ 8 = 40÷8
x = 5