In basic terms 'NO'
A 1979/80 RM250 N/T will fit a 1980-82 PE250 T/X/Z but the front bracket at top bracket under the tank needs shifting a little and also the RM's tail pipe is a little shorter or longer?
Ive got both RM250 and PE250 T pipes but i cant remember exactly now, but i can tell you teh tail section is a fair bit different. It may still work with just the mod to the mount under the tank, just depends on what muffer you use, otherwise the tail pipe needs to be the same length as the PE and have the same bends, so its relatively straight forward to use a 79/80 RM pipe on a 80-82 PE
Basically anyone wanting a RM pipe for a 78/79 PE needs to look at a 77/78 RM pipe which may fit or be able to be made to fit and should be a lot closer to fitting than a 79/80 RM pipe. Generally the PE models were a year behind the RM models. The RM's had different muffler and more often than not the mufflers attached a different way to how the PE mufflers did so even if you can get a RM pipe to fit, the PE muffler most likely wont. I can tell you that 78/79 PE250 pipes will not go on a 80-82 PE250, so that tells you they are quite a bit different which will mean a 79/80RM pipe definitely wont go on a 78/79 PE easily.