To answer this we have to see the reactive nature of phenol and the substituents attached to it.
Acidic behavior of phenol depends on the fact that how easily it can loose a proton and make phenoxide ion which is stabilized by resonance.
The methoxy group being electron donating group increases the electron density of the benzene and make it difficult to make the phenoxide ion. Thus decreasing the acidity of molecule.
But on the other hand nitro group being electron withdrawing group decrease the electron density on the benzene ring and makes it easy for the formation of phenoxide ion. Thus releasing H+ easily and showing the acidic character.