I need improve the code

I had problems whit this part,