I hope you mean 1/5 when you say 1 5. If that's what you mean, then both, Joshua and Melanie, are correct because, both of their equations are the same.
Joshua's - 8 ÷ 1/5 = 40 (Since we can divide a number by fraction, we use this rule: keep, change flip. When we use that Joshua's equation turns into 8 * 5/1 = 8*5 = 40, same as Melanie's.)