The period of a simple pendulum is dependent on the frequency. It is also dependent on the length of the pendulum but not the mass. Since the two pendulums have equal length, then their periods are equal as well.