How few possibilities must you have narrowed the choice down to before the second weighing?
The second weighing can at best divide the possibilities by three.
So, if you have three possibilities left after the second weighing, you can have a maximum of 3×3=9 after the first weighing and before the second weighing.
The first weighing must reduce the possibilities from 24 to 9 (or fewer: in fact it’s eight, because every option left open after every possible first weighing contains an even number of possibilities).
The second must reduce them from 8 to three.
The third must reduce them from 3 to one.
What general rule does that give you to follow in all the weighings?