lol, but Kakashi really disappointed me in this chapter
there is an explanation,
what if he was put in a situation similar to the nagato killing yahiko incident,
or he was controlled
or rin was controlled and the only way to stop it was to kill her
or what if it wasn't even kakashi but a white zetsu clone
madara needed obito, and obito wasn't interested in him but in kakashi and rin
they where the ones hindering madara's plan with obito
removing the both of them from obito's mind would make obito submit to him
there's no way a student of minato would kill his fellow comrade, or can you call that "friendly fire"