In NCl3, nitrogen and chlorine have similar electronegativities resulting in non-polar bonds. Nitrogen doesn’t have empty d-orbitals, thus the hydrolysis takes place with the donation of lone pair of electron by nitrogen to the hydrogen atom of water.
In PCl3, phosphorous is less electronegative than chlorine due to which they form a polar bond and thus the positive polar charge on phosphorous attacks the lone pair of electrons on water molecule to give different products.