If it makes a difference, I am an undergrad.
I am wondering how important prestige in the following situation:
I can choose between two advisors, A and B, to work with. I think that both would be great advisors, but A has more publications and seems to be more well known than B. However, B's work is much more closely related to what I am interested in, though A is somewhat familiar with this area as well. All else equal, I would like to work with B because their research interests match mine more closely. However, I will need a letter of recommendation, so I would like to get the best letter possible and I think that A would be able to provide a better letter because they have more publications and are more well known.
How should I choose between A and B?