2^^2 != 2^(2^2). Instead, 2^^2 = 2^2.
This will make more sense if you look at how the inputs a,b,n in the toy (2,2,3) and (2,3,3) present differently.
Yeah, got it now, thanks!