Answer
$ T =\sqrt{\dfrac{4\pi^2r^3}{G\left(M+\dfrac{ m }{4 }\right)}} $
Work Step by Step
To find the period of the two planets, we need to find the net force exerted on one of them.
$$\sum F_1=F_{G,\rm star\;on\;1}+F_{G,\rm 1\;on\;2}=ma_r=m\dfrac{v^2}{r}$$
where $r$ is the radius of the circular path of the planet.
Hence,
$$\dfrac{GM \color{red}{\bf\not}m}{r^2}+\dfrac{Gm \color{red}{\bf\not}m}{(2r)^2}=\dfrac{ \color{red}{\bf\not}mv^2}{r}$$
$$\dfrac{GM }{r^2}+\dfrac{Gm }{4r^2}=\dfrac{ v^2}{r}$$
recalling that $v=2\pi r/T$
$$\dfrac{GM }{r^2}+\dfrac{Gm }{4r^2}=\dfrac{ \left[\dfrac{2\pi r}{T}\right]^2}{r}=\dfrac{4\pi^2r^{ \color{red}{\bf\not}2}}{T^2 \color{red}{\bf\not}r}$$
$$\dfrac{G }{r^2}\left(M+\dfrac{ m }{4 }\right)= \dfrac{4\pi^2r }{T^2 }$$
Thus,
$$T^2=\dfrac{4\pi^2r^3}{G\left(M+\dfrac{ m }{4 }\right)}$$
$$\boxed{T =\sqrt{\dfrac{4\pi^2r^3}{G\left(M+\dfrac{ m }{4 }\right)}}}$$