See the attached diagram for additional notation.
Let $AP=2a,PB=2b$. Also, $M$ is the midpoint of $AB$, $N$ is the midpoint of $PB$, and $D,E$ are orthogonal projections of $C$. Denote $CD=c$.
Then the given area is $S={(a+b)^2\pi\over 2}-{a^2\pi\over 2}-{b^2\pi\over 2}-c^2\pi=(ab-c^2)\pi$
Thus $ab\pi=39\pi+9\pi=48\pi\iff ab=48$. Also $c=3$.
In $\triangle MNC$ we have $MN=a+b-b=a,NC=b+c,MC=a+b-c$ and also $EN=b-c,ME=MN-EN=a-b+c$.
Hence by Pythagoras
$(a+b-c)^2-(a-b+c)^2=(b+c)^2-(b-c)^2$
$2a(2b-2c)=4bc$
$ab-ac=bc\iff a+b={ab\over c}={48\over 3}=16$
Thus $AB=2(a+b)=32$
NOTE: From $ab=48\land a+b=16$ we easily find the diameters of the smaller semicircles as well: $2a=24, 2b=8$
Attachments: