I believe Kant would see the scenario as impermissible because of his views on the categorical imperative. Kant’s categorical imperative is to never act in such a way that a maxim should become a universal law. One’s duty is always a connection between moral laws. Kant believes that you can choose to do things or not to do things. What is right for a universal law? Then Kant argues that morality is based neither on principle of utility, nor on a law of nature but simply on human reason. According to Kant, reason tells us what we ought to do, and then we follow our own reason. So, to push a large person in front of a trolley would be using someone as a means to get an end. Kant feels we should not use people as a means, no matter what the feeling. Kant’s formula for humanity is that one would act in such a way as to treat humanity, whether in your own person or in the person of another, always at
the same time as an end. So Kant’s key idea here is not to use someone as a tool, even though your goal would have good reasoning.