Class assignment problem doubt

I don’t understand the test cases in this question. Please explain how we got the answer in each test cases in this problem

let a=1,b=2.
now for n=1 , we can form 1,2;
for n=2 , we can form 11,12,21;
for n=3 , we can form 111,112,121,211,212;