:Repeat pxl-Test(Ans,B)=2
How would I do this?
Well, first of all, pxl-Test returns either a 1 or a 0, so that loop would go forever.

If you wanted to do something like:
Repeat pxl-Test(Ans,B)=1 (which is the same as doing
Repeat pxl-Test(Ans,B))
Then in Casio Basic, the code would look like this:
While pxl-Test(Ans,B)=0