Answer: Z+Y-X
Step-by-step explanation: Alice is x years younger than Bob and y years younger than Charles. Diane is the youngest, and is z years younger than Bob. This shows that Charles is the oldest, Bob is the 2nd oldest and Alice is the 3rd oldest (or 2nd youngest). A function to solve this problem would be z+y-x, meaning if you add how much younger Diane is to Bob to how much younger Alice is to Charles, then you subtract how much younger Alice is to Bob you will get how much younger Diane is to Charles.