Well if you want to save the relationship the first thing you should do is tell him exactly what you think about him making a pass at your friend - as far as I'm concerned that's totally unacceptable and if he's not showing any remorse over it then alarm bells should be ringing. He needs to understand that he's upset you and be sympathetic to your feelings about being around the pair of them from now on. He should be feeling guilty and wanting to regain your trust. If there's no sign of any of those things then I would have a good hard think because it sounds like he might have been deliberately trying to hurt or annoy you. If you don't get it all out in the open now, make your feelings known, talk it out and get an apology (as well as a promise of better behaviour in future) then you're just going to end up resenting him and the frustration you're feeling now will build to a point where you have an outburst and say hurtful things that you regret. To move on you need to be sure you're not going to throw it back in his face in every argument.
My personal advice is this. If he is behaving childishly by going out with his friends when you have plans and not talking to you about it, agree to have a period of time, say a fortnight or perhaps a month, where you both get all your silly behaviour out of your systems, on the condition that when that time is over, you both have to commit to making your relationship better again, not just staying together for the sake of it. He can go out with his mates (although agree ground rules about getting with other people, or not) as much as he likes and you can spend some time with yours, doing all the things you can't do with a boyfriend like real girlie shopping, pampering and duvet evenings with the girls. Perhaps check in with each other once a week but make sure you don't pressure him into ringing you, then meet again in a non threatening environment, like over a coffee, and discuss your relationship. You've been together a while especially as you're young, and it's pretty natural to get a bit restless. Lots of people, especially guys, get to a point where they begin to miss being single but chances are all he needs is a bit of an insight into what his life would be like without you to make him wake up a bit and see what he could be throwing away. Hope things work out for you x