In two Simaese twins where the first will definitely die soon, whereas the second has a chance of life if the first stops being a 'drain' him. Like if there is only one heart. Can one kill the first so that the second one can live. The question is really if the second ones blood is considered 'redder' in this case. And if that term used in the gemoro is meant to be taken literally. That means if the second one is better for some reason the first may be killed. I am told that RMF allowed it in a 'landmark' psak and others also discuss it.
the rules for killing to save are very complicated and there are many opinions i will try to stick to areas of non-controversy
the laws usually are that you cant do any act of choosing one over another b/c you dont know who is "worth" more souls hence if gentiles surround a city and threaten to kill evry1 if some1 isnt handed to them you may not pick some1 to send out (this is not argued upon to my knowledge)
HOWEVER a act of saving is permitted so if they say give us a list of 100 ppl to NOT kill you may give them a list
this is the main reservation in killing to save
and based on this if baby 1 is dieing anyway (גוסס) you may kill to save
however im not sure how actually killing "beyadaiim" factors in
Here are some sources (they all deal with R' Moshe Feinstein's תשובה):
Rabbi Tendler's article also appears in his "Care of the Critically Ill" (1996) where he indicates that the תשובה was not published.