Why is the period of rotation the same for two stars orbiting the same centre?
The centre of mass of the binary system cannot move because there are no external forces acting.
The line joining the two stars must always pass through the centre of mass, because by definition the centre of mass lies on the line between the two stars.
That means the two stars must orbit with the same period. If their periods weren't the same they could not remain on opposite sides of the COM.
Kepler's third law is irrelevant here. It applies to many (small) planets orbiting a (large) central star, not to a binary star system.
If the stars have masses $m_1$ and $m_2$ and the radii from the COM are $r_1$ and $r_2$, then from the definition of the COM, $m_1r_1 = m_2r_2$.
The (gravitational) central force $F$ acting on each star is the same, but the central accelerations are different because the masses are different. If the radial accelerations are $a_1$ and $a_2$, then $a_1 = F/m_1$ and $a_2 = F/m_2$.
If the angular velocities are $\omega_1$ and $\omega_2$, for circular orbits we have $a_1 = r_1 \omega_1^2$ and $a_2 = r_2 \omega_2^2$.
So $\omega_1^2 = a_1/r_1 = F/(m_1r_1)$ and $\omega_2^2 = F/(m_2r_2)$.
Since $m_1r_1 = m_2r_2$, we have $\omega_1 = \omega_2$.
Note that we did not need to use Newton's inverse square law of gravitation, which is implied by Kepler's third law. We only needed Newton's third law - i.e. since the two stars form a closed system, the internal forces on the stars are equal and opposite.
You are combinig two question, I am combining two answers.
The system you describe consists of two points with masses. We know that:
- Every two points $A$ and $B$ lay on a single line;
- When line is rotated around axis intersecting it, all points of the line have same angular velocity $\omega$, except for the intersection with $\omega_0=0$;
- Centre of mass $C$ of two points lays between them, so they are collinear.
So, when the stars move in any direction, their angular speeds, measured against their centre of mass, will be the same, no matter how and why they move.
Kepler's law was derived for binary system where planet with negligible mass orbits around its star and this star is The centre of mass of this system and serves to compare periods of two planets with different distances from their star.