But his action wasn't to kill his friend. His friend made his own choice to enter the property - is getting killed not entirely his own responsibility? Surely by your logic it is?
No you are wrong.
Its was a group that did the crime and so the group as a whole takes the time. If he didnt want to get charged for murder he should have immediate persuaded his friend not to do it and inform the police to what was about to happen.