Part A seems you missed the i² completely. You mistakenly wrote i² as i and calculated. Also not sure where 5 came from.. the last equation should be 4-i²+3i+p=0 and p=i²-3i-4
You are partly correct, I meant to write i² but instead wrote i however I was working from correct solutions so the answer is correct. The 5 comes from -i²+4, -i² is 1 so 1 + 4 = 5