Total Device vs Total Package Dissipation
It's per package, also you will have to derate for ambient temperature so the maximum per transistor is the dual at 350mW per transistor at 25'C. 

However note that that puts the junctions at 151'C at 25'C Ta. The 25'C ambient maximum is unrealistic in most cases, and 151'C is very high if you care about reliability. Personally I think more like 150mW per transistor would be more conservative. That would yield a Tj of about 125'C at Ta = 70'C.  

If you need a nominal dissipation of 500mW per transistor, I suggest individual TO-252 or at a minimum SOT-89 transistors, mounted on an adequate area of copper. 



Just as an aside, it's unusual to have a wimpy transistor like a 2N2222A dissipating 1/2-W, there could be other issues cropping up like SOA. Makes me think you might be doing something wrong, but that's just a guess, feel free to ignore if you are all set.