\[\boxed{\mathbf{40}.}\]
\[1)\ \left\{ \begin{matrix} x + (a - 1)y = a\ \ \ \ \ \ \ \\ 5x + (3a + 1)y = 15 \\ \end{matrix} \right.\ \text{\ \ \ }\]
\[\ \left\{ \begin{matrix} x + ay - y = a\ \ \ \ | \cdot ( - 5) \\ 5x + 3ay + y = 15\ \ \ \ \ \ \ \ \ \ \ \\ \end{matrix} \right.\ \]
\[\left\{ \begin{matrix} - 5x - 5ay + 5y = - 5a \\ 5x + 3ay + y = 15\ \ \ \ \ \ \ \ \ \ \\ \end{matrix} \right.\ ( + )\]
\[- 2ay + 6y = - 5a + 15\]
\[y(6 - 2a) = - 5a + 15\]
\[y = \frac{15 - 5a}{6 - 2a} = \frac{5 \cdot (a - 3)}{2 \cdot (a - 3)} =\]
\[= 2,5;\ \ \ a \neq 3.\]
\[Если\ a = 3;то\ система\]
\[\ уравнений\ имеет\ бесконечно\]
\[\ много\ решений.\]
\[x + (a - 1)y = a;\ \ \ a = 3\]
\[x + 2y = 3\]
\[x = 3 - 2y.\]
\[(3 - 2y;y);y \in R.\]
\[2)\ \left\{ \begin{matrix} x - (a + 1)y = 2a \\ ax - 6y = 8\ \ \ \ \ \ \ \ \ \ \ \ \\ \end{matrix} \right.\ \text{\ \ }\]
\[\ \left\{ \begin{matrix} x = ay + y + 2a\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ a(ay + y + 2a) - 6y = 8 \\ \end{matrix} \right.\ \text{\ \ \ \ }\]
\[\left\{ \begin{matrix} x = (a + 1)y + 2a\ \ \ \ \ \ \ \ \ \ \ \\ \left( a^{2} + a - 6 \right)y = 8 - 2a^{2} \\ \end{matrix} \right.\ \]
\[a^{2} + a - 6 = 0\]
\[a_{1} = - 3;\ \ a_{2} = 2.\]
\[Если\ a = 2,\ то\ система\ \]
\[уравнений\ имеет\ бесконечно\]
\[\ много\ решений.\]
\[x = (a + 1)y + 2a\]
\[x = 3y + 4.\]
\[(4 + 3y;y);\ \ y \in R.\]