I use Polish notation. The second formula becomes CCCabaa. The rule I'll use (other than arrow introduction, which I'll call "Ci", and detachment/conditional elimination, which I'll call "Co") is {CN$\alpha$$\beta$, CN$\alpha$N$\beta$} $\vdash$ $\alpha$, which I'll call "No".
hypothesis 1 | CCaba
hypothesis 2 || Na
hypothesis 3 ||| a
hypothesis 4 |||| Nb
hypothesis 5 ||||| a
Ci 5-5 6 |||| Caa
Co 6, 3 7 |||| a
Ci 4-7 8 ||| CNba
hypothesis 9 |||| Nb
hypothesis 10 ||||| Na
Ci 10-10 11 |||| CNaNa
Co 11, 2 12 |||| Na
Ci 9-12 13 ||| CNbNa
No 13, 8 14 ||| b
Ci 3-14 15 || Cab
Co 1, 15 16 || a
Ci 2-16 17 | CNaa
hypothesis 18 || Na
Ci 18-18 19 | CNaNa
No 17, 19 20 | a
Ci 1-20 21 CCCabaa
For the first one you could also write:
hypothesis 1 | a
hypothesis 2 || b
hypothesis 3 ||| a
Ci 3-3 4 || Caa
Co 4, 1 5 || a
Ci 2-5 6 | Cba
Ci 1-6 7 CaCba
I have to wonder why you didn't also get asked to prove CCpCqrCCpqCpr. Since you can prove CCpCqrCCpqCpr using only conditional introduction and detachment,
a consequence here come as that all implications (well-formed formulas with just "C"'s and variables in them) which qualify as tautologies can get proved from conditional introduction, detachment, and the rule
{CN$\alpha$$\beta$, CN$\alpha$N$\beta$} $\vdash$ $\alpha$, since {CpCqp, CCpCqrCCpqCpr, CCCpqpp} under detachment and uniform substitution comes as sufficient for the implicational propositional calculus.