Oh this is such a bad situation, because its not nice to tell the boy you like and who likes you that his best friend asked you out, and yet he is completely in the dark about the whole thing and his friend might get a bit resentful towards him. This might not be the best solution but if I were in your shoes I would leave the whole thing for a little, so at least you can give the guy who likes you the opportunity to get over it or at least 'pretend' he doesn't like you, so that its not such a big deal with you and the friend, and there isn't so much tension. You cant make yourself like the guy and you didn't deliberately fall for his friend so try not to blame yourself x
^^^also as said above, make sure you think long and hard about it, as it might just be a crush or it might be something more, but you may still end up losing a friend over it.