Determine a generating series for the number of $5$-combinations of the letters $S,T,A,R$ where the letters $A$ and $R$ must occur at most once. Use this to find the probability that a randomly selected 5-combination satisfies the above constraints.
I think one can count this by considering the number of possibilities with no $A$'s or $R$'s, the number with one $A$ but no $R$'s, the number with one $R$ but no $A$'s, and the number with an $A$ and an $R$. But I'm not sure how to find the given generating series or which coefficient I should use to get the desired number. I know I need to somehow enforce that $A$ and $R$ occur at most once (for instance I could use the generating series $1+x$ to represent the occurrences of $A$ and $R$). I need to also account for orderings of the letters (e.g. there are $10$ ways to order $3$ S's and $2$ T's).
Your results are a bit off. For the case with no A or Rs, we simply want a 5-combination of S, T with no restraints, giving $2^5 = 32$ cases.
For both the case with A and no R or no A and R, there are 5 ways to insert the extra letter into the remaining 4-combination, giving $5*2^4 = 80$.
For the case with both A and R, there are 5*4 ways to insert the extra letters into the remaining 3-combination, giving $5*4*2^3 = 160$ and a total of $32+80+80+160=\boxed{352}$ Perhaps you made a calculation error somewhere or the problem was misphrased?
In general, if we want a generating function for n-combinations, it is important that we stay away from Ordinary Generating Functions, since our structure is ordered. Instead we should use Exponential Generating Functions, which gives us a solution of $(1+x)*(1+x)*e^x*e^x = \boxed{(1+x)^2e^{2x}}$ and accounts for the ordered structure.
This simply amounts to the manual process shown above, and the general answer will be $\boxed{a_n = (n^2+3n+4)2^{n-2}}$