More plainly, the sequence is defined recursively by
[tex]a_{n+1} = \begin{cases} 3a_n - 9 & \text{if } a_n \text{ is odd} \\ 2a_n - 7 & \text{if } a_n \text{ is even} \end{cases}[/tex]
and some starting value [tex]a_1[/tex].
We're given that the sequence alternates between two constants, [tex]a[/tex] and [tex]b[/tex], so that [tex]a_1 = a[/tex].
• If [tex]a[/tex] is even, then the second term [tex]b[/tex] must be odd, since
[tex]a_2 = 2a_1 - 7[/tex]
by the given rule, and 2×(even) - (odd) = (odd). So
[tex]a_2 = 2a-7 = b[/tex]
In turn, the third term is even, since we jump back to [tex]a[/tex]. From the given rule,
[tex]a_3 = 3a_2 - 9[/tex]
and so
[tex]3b-9 = 3(2a-7)-9 = a \implies 6a-30=a \implies 5a=30 \implies a=6[/tex]
[tex]3b-9 = 6 \implies 3b = 15 \implies b = 5[/tex]
Then the sum of the two integers is [tex]a+b=\boxed{11}[/tex]
• You end up with the same answer in the case of odd [tex]a[/tex], so I'll omit this part of the solution. (It's almost identical as the even case.)