From experience on my WRX the interval is every 30,000 miles. I have both the Impreza owner's and factory service manuals but I cannot find a maintenance schedule (which lays out how many miles the services should be done after).
In any case every 30,000 miles (for both the trans/front diff and rear diff) seems like it would be the appropriate time to do so. Even if you do it a little early it won't hurt.
The transmission and front differential are housed in the same unit so changing the transmission oil will in effect change the oil for both of them. You will need
3.5 Liters of
75w-90 gear oil.
It must be rated as GL-5. I Highly recommend using Motul full synthetic gear oil. Great protection and longevity as well as ease of use when its freezing out. With other gear oils I have noticed that its harder to shift when first driving in cold temperatures, but with Motul it works good in all temps.
The rear differential must be serviced separately with the same type of oil as the trans/front differential. You need
0.8 Liters of 75w-90 (GL-5 rated). The rear differential is quite easy to drain and fill, I have got it done in less than 30 minutes. You will need some sort of fluid pump though, I recommend one like this
Amazon.com: Slippery Pete Fluid Pump for Gallon Bottles and Wide Mouth Quart Bottles - Transfer Gear Oil, Transmission and Differential Fluid, Antifreeze with This 30cc Hand Pump: Automotive . You basically screw it on to the top of a bottle and just pump. You could also get an electric one which is quite convenient as well.
If you don't feel like waiting for the Motul to ship (even though its worth it) I could also recommend Royal Purple gear oil (which is available at AutoZone).
Lastly, get new gaskets where applicable. The transmission drain plug has a gasket (washer) that should be replaced. Depending on the type of rear differential your model has it may also require some washer. On my 2016 WRX it didn't, but I know that on others it may.