Can you explain how we are getting the answer?

The answer given is B ,how?