There's a few factors.
It depends on the stats of the planet the factory is on and if the SY2 is in orbit as well as if there are any other planets in the system and what their stats are like.
If the SY2 is in orbit of the planet the factory is located then they should have the same time and costs.
If the SY2 is not in orbit and there are no other planets in system then again they'll have the same time and costs.
If there are more than 1 planet then the stats of all the planets are averaged and if that average works out to be better or worse than the stats of the factory planet you time/costs will be better or worse in the SY2.