All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It appears, Allaah knows best, that it is not permissible to remove this machine from the first person to apply it on the second person for many reasons:
Firstly, as the first person, he has more right in this machine because that is similar to possessing something and no one should take it from you because of an uncertain matter.
Secondly, the harm that the second person has also exists in the first person.
Thirdly, removing the machine from the first person for a matter that we are not certain about, could lead to arguments and disputes with the family of that person. So this is the ruling we think is closer to the truth and it is a general ruling. However, if there is a specific situation that really happened then one has to look at it individually as there might be other indications which would lead us to give a different ruling than this one.
Allaah knows best.