Math problem solving funciton

image
the answer is B
can anyone help me how to solve it? :slight_smile: