Assuming $60 for 2 dives per day ,18 dives x 2 people, your looking at around $2160 with no discounts. Ask Around for that level of trips you should be able to haggle down the price. A very comfortable budget on $100 a day leaves you out at about $3500 all in. You could get by on about $50 a day if you wanted to in a shared room eating carefully and keeping your alcohol intake down.
That price ($60 for two dives) is the rate for dives from a longtail boat to the nearby Marine Park sites. For a three-dive trip to Shark Point, for example, the price is going to be more like $110, two dives to Koh Haa about $120, two dives to Hin Daeng about $150, etc.
The total cost depends on which dive sites you elect to visit, and IMO, the Marine Park sites are good for the first couple of dives, to get the weighting right and to get used to the water, etc., but after a short while, you'll want to go further afield, and the prices are going to reflect this.
So the answer is that your $5000 will probably only cover the diving with only whatever discounts you can get for multiple days of diving left to pay for your lodging and meals, etc.
I would also say that you'll get bored with two weeks of diving from Phi Phi. There just aren't enough sites available for you not to repeat sites (though some sites you might want to repeat once). Given that you are planning your trip in June, it's also possible that you won't be able to get down to Hin Daeng by speedboat because of sea conditions.