Complex sentence: The Doctor and Clara activated the device together not knowing which one of them will have their mind wiped, the device wipes the Doctor's mind, his memories of Clara are eradicated.
Split into simpler sentences: The Doctor and Clara activate the device together not knowing which one of them will have their mind wiped. The device wipes the Doctor's mind, his memories of Clara are eradicated.