Unfortunately, this is a known problem with these engines on the Pathfinder/QX4.
Those are the power valves, and the screws that hold them in come loose and get ingested into the engine.
The end result is usually a blown engine.
They are supposed to have loctite, but most don't.
A lot of the guys on this forum have taken the intake manifold off and tightened and loctited the screws as a preventative measure.
I did mine last year.
If the screws somehow made it through with minimal damage, then you may have saved the engine, but I doubt it.
There are a few threads on here on this subject.
There is a sticky at the top of this forum called threadlocker on power valve screws:
threadlocker-on-power-valve-screws-pics-t304263.html