I think that the teen who just had his girlfriend leave him is likely going through a rough time and will probably need some emotional support. Try to hang out with him a bit, and once you think he's willing to talk more ask him about why the friend bought him condoms.
As for the purchaser, I would talk to the teen, and honestly ask him what his thoughts were behind why he purchased it. It's a great way to open up a conversation about God's plan for our sexuality, and once you've taught him what God's plan is, then start teaching about the dangers of and issues that pre-marital sex creates.
If you would like to dialogue more on this, send me a message.