My initial instinct is that it is OK to take 1 for 4 from both of them, but upon further inspection that might not be so.
Let me ask you:
Does the situation change if the one on the trolley is your child and the four strangers, despite them all being someone’s children?
Does the situation change if the one on the trolley is alive and begging you to not kill him or her, and the four are all sound asleep due to a sleep syrum or whatever dastardly men with curly mustaches use nowadays?
Does the situation change if you know the one on the track is innocent while the four are all repeat, serial rapists and murderers?
Does the other situation change if the one with the organs is your child? What if the four in need are all your children, and the one a stranger?
Does the situation change if the one with the organs says he does NOT want that to happen to him and refuses surgery? Does the situation change if the one with the organs is also injected with some sleeping syrum? Does the situation change if the one the organs says he most certainly does want the surgery if it means he can save the four lives?
But, now I will answer the question based upon thought and not instinct.
Assuming you are in a situation wherein a presumably empty trolley is coming to hit 4 tied up strangers who are injected with a sleep syrum on their track yet there is a lever that you can pull that is close enough to pull it in time yet too far away to try to save the four or stop the trolley, and on the one and only other track there is one stranger also injected with sleep syrum tied up, then obviously you just need to defeat the villian who set this up, that always saves the day in these types of situations. Crisis averted.
Oh, and the doctor also has organs that match and if they both give two organs they both get to live, but in transplanting the organs from the doctor, one of his less experienced nurses had to do the act, and there was only a 60% chance of survival for everyone but it all worked out according to television common sense.