Let mid-point of DC be E and mid-point of AB be F.
Since O1 and O2 are circumcentres,
therefore both lie on the pependicular bisectors of DC and AB passing through E and F.
Now, O1P=O1B and O2P=O2D
Also ∠CAB=∠ACD=45∘
∴∠BO1P=2×45∘=90∘=∠DO2P
(∵ angle subtended by an arc of a circle at its centre =2× the angle subtended at its circumference)
∴ ∠O1PB and ∠O2PD are isosceles right triangles.
Using the above information and symmetry,
∠DPB=120∘
Also, △ABP is congruent to △ADP (SAS)
and △CPB is congruent to △CPD (SAS)
∴∠APB=∠APD=60∘
and ∠CPB=∠CPD=120∘
Now, ∠ABP=(180−60−45)∘=75∘
⇒∠O1BF=30∘
and ∠PDC=(180−120−45)∘=15∘
⇒∠O2DE=30∘
∴△O1BF and △O2DE are right angled triangles.
BF=DE=122=6
⇒O1B=O2D=4√3
and PB=PD=4√3cos45∘=4√6
Now, let x=AP
Using law of cosine on △ABP, we have
96=x2+144−24x×1√2
⇒x2−12√2x+48=0
⇒x=√72±√24
Taking the positive root, AP=√72+√24
∴a+b=72+24=96