On a subset with nilpotent and invertible values in prime rings