Let the line \( l \) have direction ratios \( (i + j + k) \), and let \( P \) be the point of intersection of \( l_1 \) and \( l_2 \). From the given information, we have the following system of equations:
For \( l_1 \), direction ratios are given as \( i + 2j + 3k \), and for \( l_2 \), direction ratios are \( i + 2j + k \). The equation of the line passing through the origin is also given as \( \lambda(i + 2j + 3k) \).
From this, we compute:
\[
a = 2i - 3j - 2k
\]
\[
b = 2j - 3k
\]
\[
c = -i - 5j - 3k
\]
Solving the system, we find the intersection point of \( l_1 \) and \( l_2 \). Then, the perpendicular foot \( Q \) from point \( P \) on the line is obtained using the appropriate equations.
We conclude that:
\[
a + b + \gamma = 5
\]
Thus, the correct answer is \( \boxed{5} \).