I think its doesn't matter which way you go first but as above say depends on which airlines you're using.
Thai airways Bangkok - Phuket - koh phi phi - krabi - koh Samui by Bangkok airs direct to koh Samui - koh Samui back to Bangkok with either Thai airs or Bangkok airs for home bound.
Malaysia airlines KL - Phuket with air Asia - Phuket - phi phi - krabi Bangkok airs to Samui - samui back to KL by Bangkok airs direct from island or via ferry to mainland fly back to KL with air Asia.
Singapore airlines, Singapore - silk air to Phuket - phi phi - from krabi fly direct to Samui - Samui back to Singapore with either Silk or Bangkok airs. ** or you can revers this order by do Samui first and Phuket last **
If this involved too much coast and travel time then perhaps sticks to one coast either koh Samui / koh Tao / koh phangan. Or only do Phuket and phi phi.
Phuket and koh Samui are on opposite side of the country and it is quite expensive to fly between theses places. You can travel by bus and ferry but it take longer to get there at least full day with bus and ferry transfers.