How to write a letter declining a supervisor offer?
A few suggestions:


Don't mention the order of events or the fact that you listed B as the prior, unless A asks. That is, something like "I had applied for this grant listing several potential supervisors, as both yourself and B are able to supervise this work. etc. etc." ; if A asks why you didn't list him/her as the prior, then mention the timing.
If there is the theoretical possibility of you asking for a change of sueprvisor for the grant from B to A, you will (sort of) need to justify why it is you're not doing so.
If co-supervision is an option, you'll need to either ask for from A, or explain why it's not relevant.
I would try to organize some sort of visit with A, or suggest other ways you might collaborate or that you might be useful to him (although there might not actually be such an option, in which case forget about it).