Yes you can cover both in the same trip. 4 days at each of the place are idea. The connectivity to bangkok would be higher from mumbai, so you might get cheaper deals. Then you can fly to phuket from bkk. There are direct flights to phuket from mumbai too.