I used tool from this thread to gain root. After I used root checker basic to check I was rooted and it said I was.
I used tool from this thread to install custom recovery, I believe successfully. I was able to reboot into recovery afterwards.
To try and install CM I tried to follow the instructions in this post.
To do 4&5 in twrp, I wiped cache, system and dalvik. I got the problem in the following picture (pictures are all links because I couldn't work out how to get them small enough to attach).
It eventually formatted all three.
I then tried to install CM, PA gapps, and recovery (as suggested in the recovery thread to make sure keep recovery after reboot). This happened.
I didn't make a backup in advance because I am an idiot. I do have TA backed up.
What did I do wrong and how can I fix it please?