Quoted:
I may need to work a month in NJ and a month in PA, how does it work when firearms are involved. can someone purchase under both states laws ??
View Quote
According to federal law, for the time that you reside in a particular state, you are a resident of that state for purposes of purchasing firearms.
Now - that said, that really doesn't matter in NJ, because of state law. You must have a NJ Firearms ID card to purchase rifles and shotguns, and a NJ Permit to Purchase a Handgun to purchase pistols, in NJ. Obtaining either will require proof of NJ residency, and several months to process said application. With your time frame, you might as well not even bother with NJ.
In PA, however - all you would need is proof of PA residency. Some form of PA ID - a driver's license, or a voter registration card, should suffice. And, to obtain either of those, you will need to show copies of utility bills, rental agreements, mortgage papers... something to show that you really do reside in PA.