Since we know that Sally ended up with 9 boxes of strawberries, and sold half of the remaining strawberries, she must've had 18 boxes. Adding the 5 boxes from the beginning gets us 18+5=23
You also could've wrote an equation.
x=boxes of strawberries
x the total amount of boxes in the beginning of the day