If the domain of the function \( \log_5 (18x - x^2 - 77) \) is \( (\alpha, \beta) \) and the domain of the function
\[
\log_{(x-1)} \left( \frac{2x^2 + 3x - 2}{x^2 - 3x - 4} \right)
\]
is \( (\gamma, \delta) \), then \( \alpha^2 + \beta^2 + \gamma^2 \) is equal to: