The first incident (I had a great view of it lol), I’d have to say that you could have left him more room in the beginning. He had DRS and was going to get passed anyway, so you should have stayed right more than you did. I’m not saying you should have just given it up, but there was little you could have done to defend it.
As for the second, it was a little bit stupid to try and make a move like that from Alfie, but after his lock up, he did look to have it under control, but you continued to drive into him, and two cars can’t go into one.
Both weren’t 100% your fault, but there was more that you could have done, especially in the first incident.