Step 1: Total number of observations \( n = 7 \).
Given mean \( \bar{x} = 8 \):
\[
\text{Sum of observations} = 7 \times 8 = 56
\]
Sum of known observations:
\[
12 + 14 + 4 + 10 + 2 = 42
\]
\[
\Rightarrow x + y = 56 - 42 = 14 (1)
\]
Step 2: Variance is given by:
\[
\sigma^2 = \frac{1}{n}\sum (x_i - \bar{x})^2
\]
Given variance \( = 16 \):
\[
\sum (x_i - 8)^2 = 7 \times 16 = 112
\]
Step 3: Compute squared deviations of known terms:
\[
(12-8)^2 = 16,\;
(14-8)^2 = 36,\;
(4-8)^2 = 16,\;
(10-8)^2 = 4,\;
(2-8)^2 = 36
\]
\[
\Rightarrow \text{Sum} = 108
\]
Thus,
\[
(x-8)^2 + (y-8)^2 = 112 - 108 = 4 (2)
\]
Step 4: Expand equation (2):
\[
x^2 + y^2 - 16(x+y) + 128 = 4
\]
Using \( x + y = 14 \):
\[
x^2 + y^2 = 100 (3)
\]
Step 5: From:
\[
(x+y)^2 = x^2 + y^2 + 2xy
\]
\[
196 = 100 + 2xy \Rightarrow xy = 48
\]
Step 6: Solve for \( x, y \):
\[
t^2 - 14t + 48 = 0
\Rightarrow t = 8, 6
\]
Given \( x>y \):
\[
x = 8,\; y = 6
\]
Step 7: Required value:
\[
3x - y = 3(8) - 6 = 18
\]