It is correct @josegilberto, the experiment was proposed to refute those who defended the utilitarians, who defend that good actions are those in which you get more profit. But here also come into play principles, values, religions, feelings towards those who could die, so it will not depend on valuing only the option where there is more profit (saving the 5 people).
Thanks for commenting