First, enter the federal K-1 into your federal return and finish up the federal return before going to the states. Your nonresident Illinois return will pick up what it needs from the federal return. Be sure to allocate to IL only the IL-source income. This assumes the K-1 has IL-source income on it.
Then prepare your resident PA return. TT/PA will get what it needs from the completed nonresident TT/IL return to prepare the Other state tax credit for you for some or all of the IL tax on the K-1 income that both states are taxing. This helps prevent double taxation.