Kepler's Third law takes a slightly different form when you consider motion around the center of mass. The equations of motion are
$$
\begin{align}
m_1\ddot{\boldsymbol{r}}_1 &= - \frac{Gm_1m_2}{|\boldsymbol{r}_1 - \boldsymbol{r}_2|^3}\left(\boldsymbol{r}_1 - \boldsymbol{r}_2\right),\\
m_2\ddot{\boldsymbol{r}}_2 &= \frac{Gm_1m_2}{|\boldsymbol{r}_1 - \boldsymbol{r}_2|^3}\left(\boldsymbol{r}_1 - \boldsymbol{r}_2\right).\\
\end{align}
$$
If you want to describe the relative motion of one celestial body with respect to the other one, you can combine these equations to obtain
$$
\ddot{\boldsymbol{r}}_1 - \ddot{\boldsymbol{r}}_2 =
- \frac{G(m_1+m_2)}{|\boldsymbol{r}_1 - \boldsymbol{r}_2|^3}\left(\boldsymbol{r}_1 - \boldsymbol{r}_2\right),
$$
or in short
$$
\ddot{\boldsymbol{r}} = - \frac{\mu}{r^3}\boldsymbol{r},
$$
where $\boldsymbol{r} = \boldsymbol{r}_1 - \boldsymbol{r}_2$ and $\mu =G(m_1+m_2)$. This is the familiar Kepler problem, with the corresponding 3rd Kepler law
$$
T^2 = \frac{4\pi^2}{\mu}a^3.
$$
On the other hand, if you wish to describe the motion of both celestial bodies with respect to the center of mass, you need to separate $\boldsymbol{r}_1$ and $\boldsymbol{r}_2$ in the equations of motion. You can do this by using the fact that the position of the center of mass remains constant
$$
m_1\boldsymbol{r}_1 + m_2\boldsymbol{r}_2 = \boldsymbol{0},\tag{1}
$$
so that
$$
\boldsymbol{r}_1 - \boldsymbol{r}_2 = \frac{m_1+m_2}{m_2}\boldsymbol{r}_1 =
-\frac{m_1+m_2}{m_1}\boldsymbol{r}_2.
$$
Therefore,
$$\begin{align}
m_1\ddot{\boldsymbol{r}}_1 &= -Gm_1m_2\left(\frac{m_2^3}{(m_1+m_2)^3r^3_1}\right)\left(\frac{m_1+m_2}{m_2}\boldsymbol{r}_1\right),\\
m_2\ddot{\boldsymbol{r}}_2 &= Gm_1m_2\left(\frac{m_1^3}{(m_1+m_2)^3r^3_2}\right)\left(-\frac{m_1+m_2}{m_1}\boldsymbol{r}_2\right),
\end{align}
$$
or
$$\begin{align}
\ddot{\boldsymbol{r}}_1 = -\frac{\mu_1}{r^3_1}\boldsymbol{r}_1,\qquad\text{and}\qquad
\ddot{\boldsymbol{r}}_2 = -\frac{\mu_2}{r^3_2}\boldsymbol{r}_2,
\end{align}
$$
with
$$\mu_1 = \frac{Gm_2^3}{(m_1+m_2)^2},\qquad\text{and}\qquad
\mu_2 = \frac{Gm_1^3}{(m_1+m_2)^2}.
$$
So once again we have two Kepler problems, but this time the 3rd laws take the form
$$
T^2 = \frac{4\pi^2}{\mu_1}a_1^3,\qquad\text{and}\qquad
T^2 = \frac{4\pi^2}{\mu_2}a_2^3.
$$
Note that this implies $\mu_2a_1^3 = \mu_1a_2^3$, which simplifies to
$m_1a_1 = m_2a_2$, consistent with Eq. (1). Also, $\mu_1 a = \mu a_1$ and
$\mu_2 a = \mu a_2$ lead to $m_2 a = (m_1+m_2)a_1$ and $m_1 a = (m_1+m_2)a_2$, so that indeed $a = a_1+a_2$.