This is a problem where you need to work backwards. Here's what Tom did originally:
1) Had some comic books
2) sold half
3) bought 6
4) has 12
Lets start from the end and go backwards:
4) Tom has 12 comic books
3) He just bought 6. How many did he have before this? You want to undo what he just bought (added) so subtract 6.
2) He'd sold half his collection, so he has half left. Double the amount you got from the previous step to figure out what it is half of.
1) This is how many he started with!