Horayot 13 - Order of Precedence
When one has any two mitzvot that he can perform, he should first do the one that is more frequent, and this is derived from the order of sacrifices in the Temple. If one mitzvah is more sacred than the other, it has to be done first. If the High Priest's bull and the assembly's bull, brought for a court's error, are both standing to be sacrificed, the High Priest's bull goes first - not based on the above rules, but because it is called "first" by the Torah.
If a man and a woman both need food or clothing, the woman takes precedence, because the man can go begging door to door. When both are held captive, the woman is ransomed first.
Art: Old Clothing Merchant in Cairo by Jean-Leon Gerome
