Not passing test case 2

Please check why my code fails test case 2: