AB is a two-digit number, where A represents the tens digit and B represents the unit digit

I brute forced this problem, but does anyone know a better way to solve that will take less time? Thank you!

Brute-force is OK. Also see the Extreme Quant Problem of the Day for July 8th at Daily Videos - GregMat