"Mr Tan has 315 cartons of 30 oranges each."
total at first → 315 x 30
"He buys 45 more oranges"
total in the end → total at first + 45 = 315 x 30 + 45
"repacks all the oranges into packets of 5 oranges each."
number of packets → total in the end ÷ 5 = (315 x 30 + 45) ÷ 5