There's a few different rules in play here.
Assuming none of the aircraft are smalls. Tower's separation after a heavy departure would be 2 minutes after the 1st starts it takeoff roll, unless the 2nd departure is at an intersection then it would be 3 minutes from when the 1st takes off. 7110.65 ch 3 sec 9
Tower's separation between a departing heavy and an arrival is the departing aircraft "has departed and crossed the runway end or turned to avert any conflict" or it is airborne and 6000ft down the runway if "distances by reference to suitable landmarks" can be determined. A wake turbulence advisory is needed but no additional separation. ch 3 sec 10
Then there's radar separation.
Departure to arrival separation on the same runway for other then intersection departures would be 2 miles increasing to 3 within 1 minute of takeoff. Ch 5 sec 8
Separation on final, (between arrivals), with a heavy behind a heavy is 4 miles. A large behind a heavy would be 5. ch 5 sec 9