Mixing--Demixing Transition in Polymer-Grafted Spherical Nanoparticles