2 + 4 + X = 12
6 + x = 12
x = 6
Let's say you have the first number (2 in the example) in cell A1, the second number (4 in the example) in cell A2, and the total (12 in the example) in cell A3. In cell A4 you can enter the formula =A3-A2-A1
If you don't know the total, then it's like this:
Average = Ave
First number = N1
Second number = N2
The 3 below is because you have 3 numbers (N1, N2, and x.
Ave = (N1 + N2 + x) / 3
3 * Ave = N1 + N2 + x
3 * Ave - N1 - N2 = x
If the first number (N1) is in cell A1, the second number (N2) is in cell A2, and the average (Ave) is in cell A3, then you can put this formula in cell A4:
=3*A3-A1-A2