Addition of Methyl Grignard and use of HClO4 in this question
Consider the resonance structures of the pyranone. MeMgCl attacks the structure shown second. The perchloric acid workup hydrolyses the enol ether to give the diketone shown bottom right. NaOH promotes the internal aldol cyclisation to give 3,5-dimethylphenol.