Help to understand my mistake

Please see the sticky post for how to format code.