To do this question we must realize that when any one object is "in orbit" about another object there must be a balance between the centripetal force holding the object in orbit and the centrifugal force (inertia) that wants to cause the object to continue in a straight line.
In the case of planetary orbits the two forces in balance are
Universal Force of Gravity = Centrifugal Force of circular motion
GMsMp/R^2 = MpV^2/R where
G is universal gravitational constant 6.67x10^-11 Nm^2/kg^2
Ms is mass of the star, Mp is mass of planet, and R is orbital radius.
Cancelling the Mp and one of the R on each side of the equality allows us to solve this equation for Ms:
Ms = V^2R/G
V is the speed with which the planet is orbitting the star. If the orbit is circular we can use the definition of speed to figure out an expression for V
V = total distance/total time
The distance to complete one orbit is given by 2PiR and the time is the length of the orbital period in seconds
V = 2Pi x R/T
Ms = 4(Pi^2)(R^2)R/[(T^2)G] = 4Pi(R^3)/[(T^2)G]
Ms = 2.41x10^37 kg