The RG method applied to an exactly solvable model of phase transitions