First, let's solve for \( f(x) \) using the given equation. We know:
\[
f(x) + 3f(g(x)) = x - 2.
\]
Substitute \( g(x) \) into the equation:
\[
f(x) + 3f\left( \frac{3x + 1}{x - 3} \right) = x - 2.
\]
Now, substitute \( x = 5 \) and \( x = 8 \) into the equation to find \( f(5) \) and \( f(8) \).
After calculations, we find the ratio:
\[
\frac{f(5)}{f(8)} = 5.
\]
Thus, the value of the ratio is \( 5 \).