Answer
Applying Kepler's Third Law, we obtain
$M = \left( {\frac{{4{\pi ^2}}}{G}} \right)\left( {\frac{{{a^3}}}{{{T^2}}}} \right)$,
where $M$ is the mass of the star.
Work Step by Step
Applying Kepler's Third Law to a planet revolves around a star with period $T$ and semimajor axis $a$, then we have
${T^2} = \left( {\frac{{4{\pi ^2}}}{{GM}}} \right){a^3}$,
where $M$ is the mass of the star.
Hence, $M = \left( {\frac{{4{\pi ^2}}}{G}} \right)\left( {\frac{{{a^3}}}{{{T^2}}}} \right)$.