Who to ask to write letter of recommendation: the professor who knows me better or the one that gave me a better grade?
The B instructor's letter is promising; it may be more insightful and more diligent. An impersonal letter that says "the student earned an A" may not sway any admissions committee. You could even inquire directly whether or not he's going to mention the B grade in the letter.