Periodic orbits of a non-autonomous quadratic differential system obtained from third-order differential equations