Not getting the question

how the outpu came 10 in example its not between 4 and 6