Three teachers were discussing how long they had been teaching.

Adrian and Betty had been teaching for a total of 36 years.

Charlie and Betty had been teaching for a total of 22 years.

Charlie and Adrian had been teaching for a total of 28 years.

How long had each been teaching?

Adrian had been teaching 21 years.

Betty had been teaching 15 years.

Charlie had been teaching 7 years.

Adrian and Betty had been teaching for a total of 36 years.

Charlie and Betty had been teaching for a total of 22 years.

Charlie and Adrian had been teaching for a total of 28 years.

Let Adrian = A, Betty = B and Charlie = C, then:

A + B = 36 [1]

C + B = 22 [2]

C + A = 28 [3]

If we use [3] - [2] we have:

A - B = 6 [4]

If we use [1] + [4] we have:

2A = 42

A = 21

By [1] B = 15. By [3] C = 7. QED.