From Wien’s displacement law, temperature $(T ) \propto 1/\lambda _ m$ (where $\lambda_m$ is the maximum wavelength). Thus temperature of a body is inversely proportional to the wavelength. Since blue star has smaller wavelength and red star has maximum wavelength, therefore blue star is at higher temperature then red star.