We are given that \( a \) is a common root of the equations:
\[
x^2 - 5x + \lambda = 0 \quad \text{and} \quad x^2 - 8x - 2\lambda = 0.
\]
Using Vieta's formulas for both quadratic equations, we can write the following relations for the sum and product of the roots:
1. For \( x^2 - 5x + \lambda = 0 \):
- Sum of roots: \( a + \beta = 5 \),
- Product of roots: \( a \beta = \lambda \).
2. For \( x^2 - 8x - 2\lambda = 0 \):
- Sum of roots: \( a + \gamma = 8 \),
- Product of roots: \( a \gamma = -2\lambda \).
Now, solving the system of equations:
- From the sum of roots in the first equation, we get \( \beta = 5 - a \).
- From the sum of roots in the second equation, we get \( \gamma = 8 - a \).
Now substitute these expressions for \( \beta \) and \( \gamma \) into the product relations:
- \( a(5 - a) = \lambda \),
- \( a(8 - a) = -2\lambda \).
Now, solve these equations:
1. \( a(5 - a) = \lambda \) gives:
\[
5a - a^2 = \lambda.
\]
2. \( a(8 - a) = -2\lambda \) gives:
\[
8a - a^2 = -2\lambda.
\]
Substitute \( \lambda = 5a - a^2 \) into the second equation:
\[
8a - a^2 = -2(5a - a^2),
\]
\[
8a - a^2 = -10a + 2a^2,
\]
\[
8a - a^2 + 10a - 2a^2 = 0,
\]
\[
18a - 3a^2 = 0,
\]
\[
a(18 - 3a) = 0.
\]
Thus, \( a = 0 \) or \( a = 6 \).
Step 1: Determine \( a + \beta + \gamma + \lambda \)
If \( a = 6 \), then from the previous equations:
\[
\beta = 5 - 6 = -1, \quad \gamma = 8 - 6 = 2.
\]
Thus, \( a + \beta + \gamma = 6 - 1 + 2 = 7 \). And using \( \lambda = 5a - a^2 = 5(6) - 6^2 = 30 - 36 = -6 \), we get:
\[
a + \beta + \gamma + \lambda = 7 - 6 = 1.
\]
Thus, the value of \( a + \beta + \gamma + \lambda \) is \( 1 \).