String Window Doubt

Please help me pass test case 3 in the string window question. Not able to figure it out. Check my code: