Caption: Kepler's 3rd law and the Newtonian Kepler's 3rd law formula illustrated.
Kepler's 3rd law applies to secondary bodies (or orbiting bodies) orbiting a primary body. The law is exact in the limit that each secondary body and the primary body is an exact gravitationally-bound gavitational two-body system.
The law assumes that the secondary body mass is negligible compared to the primary body mass, unless the statement of the law explicitly says its NOT negligible.
Kepler's 3rd law can written any number of ways: