At the moment, the poor person and the rich person are both buying things. If the rich person buys more vaccine, that means they will buy less of the other things, so the poor person will be able to have more of them. So the question is about the ratios of how much the two guys care about the vaccine and how much they care about the other thing… and the answer is the rich guy will pay up for the vaccine when his vaccine:other ratio is higher than the other guys. This is the efficient allocation.
It might be the case that it is separately desirable to redistribute wealth from the rich guy to the poor guy. This would indeed allow the poor guy to buy more things. But, conditional on a certain wealth distribution, it is best to allow market forces to allocate goods within that distribution.
(For simplicity I have ignored macroeconomics in this post, but the same argument broadly goes through if you don’t.)
Thanks, added.