its really mostly about the overall recruiting effort value. Spending (spending wisely) is one aspect. Distance and prestige are 2 more. A 4th factor that isn't part of that equation is timing. Prestige differences are somewhat difficult to factor, given the sliding scale. 2 coaches with B+ prestige could still be almost 2/3 of a letter grade apart if one of them is just over the cusp into B+ from B while the other is just a shade below moving up to A-. Also, few people are willing to share their actual value of prestige, for obvious competitive reasons.
Distance, of course, isn't really an actual factor in getting that final recruiting value, its more of a limiter on how much effort coaches will be able to send given the cost of the effort at distance.
A fifth factor is balls, coupled with a sense of knowing when you are likely to lose. If you get to a point where you feel comfortable with your values for things like prestige, and you factor in prestige giving yourself a 2/3 letter grade cushion, just in case* (not that when dealing with A+ there is no cap, so a very high A+ could be much more than 2/3 higher than an A-) and you still feel you can win then sticking to it and not getting scared off is a big factor...