Breakdown of Написав диссертацию, он поехал в столицу, чтобы защитить её.
он
he / it (for a masculine noun) / it (for a neuter noun)
в
in / to (direction)
её
her (acc)
написать
to write (perfective)
Elon.io is an online learning platform
We have an entire course teaching Russian grammar and vocabulary.