In Casio FX-3650P, you can press the ² for square, and ³ for cube.
In computer, you can find 字元對應表 in start menu, just select ² for square, and ³ for cube are OK.
Example:
(a+b)(a+b)
=(a+b)²
OR
=(a+b)^2
If you want a greater number, upper then ² and ³, you can use ^.
To press ^, just press SHIFT+6.
For example:
(a+c)(a+c)(a+c)(a+c)(a+c)
=(a+c)^5