Viscount
Thanks for the clarification. In my mind, the answer is simple; Pilot 2 would face demotion first due to the fact that he should be lower on the Captain's seniority list.
If however both Pilot 1 & 2 were demoted and one of them had to be made redundant (an unlikely scenario) then Pilot 1 would be the one to face redundancy as he joined last.
In the same way, imagine that you had a First Officer that had been with the airline for 15 years and had never been upgraded (it happens). Then the airline faced some savage cuts and lots of Captains were demoted and one of those Captains had only been with the airline for 7 years, it would be proper for him to face redundancy before the 15 year man.
As I say, it s simple to me, but others will undoubtably see it in a different light.