Bank A has an effective annual rate of 18%. Bank B has a nominal annual rate of 17%. What is the smallest whole number of times per year that Bank B must compound its interest in order that the rate at Bank B be at least as attractive as that at Bank A on an effective annual basis?

I have tried using the effective annual to nominal rate equation, equating the two and trying to solve for m but can not seem to get the answer.

Can someone please help?