Police officers only have jurisdiction in the city/town/county they are sworn in to. An NYPD detective would have no jurisdiction in Philadelphia. He would have to report to Phili PD and get permission to be in the city and any arrest would have to be done by Phili. They would have to arrest a "perp" and wait for an extradition order from a local judge.