MATL, 14 bytes
w1Y\^tkwXkh1G^
Try on MATL Online or Test all cases
w % Get both inputs and bring P to the top of the stack
1Y\ % Take the inverse of P
^ % Raise N to that power i.e. take N's P-th root
tk % Take a copy of that root and floor it
Xk wXk % And ceil the original copy
h1G^ % Raise both those values to the power of P