Branch not working properly

Is there any other way of doing what I’m trying at least?