I voted for 'top 3 priority' but would probably opt for house B in your scenario assuming that there's really a significant preference for it other than the commute distance. I've always considered the commute distance&character but the work location has ended up moving around some after we chose a house location. First house we bought was when we were in a temporary work location and picked a spot about 8 miles from that location but only 4 miles from the likely future location. Our current house was only about a 2 mile commute along a MUP but the work location then changed to be about 6 miles in the other direction along the same MUP.
It'd be a shame to go for house A just for the shorter commute and then have your work location move.