I read the related post here but my situation is a bit different. I'm going from Pennsylvania to NYC/JFK to pick up a friend in a few weeks. We both live in Pennsylvania and would wanna go back home. Can we leave New York immediately once I pick her up or stay less than 3 days or we definitely have to stay in New York for 3 days (according to the COVID-19 Travel Advisory) and take a COVID test? If we should stay, will hotels let us share a room? Do I need to provide her info to the hotel reception as well? TLDR: I'm planning on arriving to the hotel a few hours before her flight lands but I don't know the procedures once I pick her up.
New York is not the main destination for either of you—Pennsylvania is. The page you will want to review is COVID-19 Information for Travelers from the Pennsylvania Department of Health.
Generally, people in transit have not been subject to the same requirements as people arriving at their destination. The purpose of these orders after all is to limit the risk of someone from outside the state infecting those inside the state. If you leave the state, you have fulfilled the purpose of the order. If contacted by the New York State Department of Health, simply inform them that you have left New York, and that will be the end of the matter.
New York requirements
It seems likely that you will not have any trouble here so long as you do not stay in the state for a prolonged time. The only reason I hesitate here is that older versions of the NY state travel rules specifically allowed for an exception for travelers who were in the state for less than 24 hours; but the most recent travel rules for New York state do not contain such an exception. If you wanted to be absolutely sure about this, you could call the NY State coronavirus Hotline at 1-888-364-3065, or submit a question to their Ask a Question form.
Even if your friend did have to quarantine, you are not required to. As you will be arriving from a "contiguous state", you are not required to quarantine in New York:
Contiguous states are Pennsylvania, New Jersey, Connecticut, Massachusetts and Vermont. Travelers from these states are not subject to this guidance.
Current Pennsylvania requirements do allow an exception for people who have been out of the commonwealth for less than 24 hours:
Individuals over the age of 11 traveling into and returning to the Commonwealth from any location outside of the Commonwealth (including international locations) must produce evidence of a negative COVID-19 test or place themselves in travel quarantine for 14 days after entering the Commonwealth, subject to the conditions specified in Section 3 below, unless they qualify for one of the exemptions specified in Section 4.
The following individuals are exempt from this Order... :
Individuals who are returning to the Commonwealth after traveling outside of the Commonwealth for less than 24 hours.
However, if you stay with your friend in New York for more than 24 hours, you will no longer be exempt from this rule, and you will either have to obtain a negative test or quarantine for 14 days upon returning to Pennsylvania.