Writing out a whole expansion is wasteful when a question asks for just one term. The general term is a single formula that produces any term you want by plugging in its position.
$$T_{r+1}=\binom{n}{r}a^{n-r}b^{r}$$
Here $T_{r+1}$ is the $(r+1)$th term of $(a+b)^n$. The off-by-one is the only thing to watch: $r=0$ gives the first term $T_1=a^n$, $r=1$ gives the second term, and so on up to $r=n$ for the last term $T_{n+1}=b^n$. So to reach the $k$th term, set $r=k-1$. For the common form $(1+x)^n$ the general term simplifies to $T_{r+1}=\binom{n}{r}x^{r}$.
The middle term depends on whether $n$ is even or odd, because there are $n+1$ terms in all:
$$\text{if }n\text{ is even: one middle term }T_{\frac{n}{2}+1};\qquad\text{if }n\text{ is odd: two middle terms }T_{\frac{n+1}{2}}\text{ and }T_{\frac{n+3}{2}}.$$
The logic is simple. With $n+1$ terms total, an even $n$ gives an odd count of terms, so there is one term dead in the centre at position $\frac{n}{2}+1$. An odd $n$ gives an even count, leaving two terms sharing the middle.
Deeper Insight — read $r$ as a counter, not a position: Almost every error with the general term comes from confusing the index $r$ with the term number. Think of $r$ as a counter that starts at zero — it counts how many factors of $b$ a term carries, and equivalently how many of the $n$ brackets contributed a $b$. That is exactly why $\binom{n}{r}$ appears: it counts the choices of those $r$ brackets, the same subset-counting from the previous topic. Because $r$ starts at $0$, the term number is always one more, hence $T_{r+1}$. Once you fix this in your mind, middle terms stop being a memorised rule: the centre of $n+1$ slots is at slot $\frac{n+1}{2}+\frac12=\frac{n}{2}+1$ when that is a whole number (even $n$), and otherwise the two slots straddling the centre are the middle pair. Treat the formula as a way of selecting a term and the parity question answers itself.
Find the 5th term in the expansion of $(2x+3)^7$.
Solution- For the 5th term set $r=k-1=4$ in $T_{r+1}=\binom{n}{r}a^{n-r}b^{r}$ with $n=7,\ a=2x,\ b=3$.
- $T_5=\binom{7}{4}(2x)^{7-4}(3)^4=\binom{7}{4}(2x)^3(3)^4$.
- $\binom{7}{4}=35,\ (2x)^3=8x^3,\ 3^4=81$.
- $T_5=35\cdot 8x^3\cdot 81=22680\,x^3$.
Answer: $T_5=22680\,x^3$.
Find the middle term in the expansion of $\left(x+\dfrac{1}{x}\right)^{10}$.
Solution- $n=10$ is even, so there is one middle term at position $\frac{n}{2}+1=6$, i.e. $r=5$.
- $T_6=\binom{10}{5}x^{10-5}\left(\dfrac{1}{x}\right)^{5}=\binom{10}{5}x^{5}\cdot x^{-5}$.
- $\binom{10}{5}=252$ and the powers of $x$ cancel.
Answer: The middle term is $T_6=252$.
Find both middle terms in the expansion of $(2x-y)^7$.
Solution- $n=7$ is odd, so the two middle terms are $T_{\frac{n+1}{2}}=T_4$ and $T_{\frac{n+3}{2}}=T_5$.
- $T_4$ (here $r=3$): $\binom{7}{3}(2x)^4(-y)^3=35\cdot 16x^4\cdot(-y^3)=-560\,x^4y^3$.
- $T_5$ (here $r=4$): $\binom{7}{4}(2x)^3(-y)^4=35\cdot 8x^3\cdot y^4=280\,x^3y^4$.
Answer: Middle terms are $T_4=-560\,x^4y^3$ and $T_5=280\,x^3y^4$.
Find the coefficient of $x^5$ in the expansion of $(1+x)^{15}$.
Solution- For $(1+x)^n$ the general term is $T_{r+1}=\binom{n}{r}x^{r}$, so the power of $x$ equals $r$.
- Set $r=5$ with $n=15$: coefficient $=\binom{15}{5}$.
- $\binom{15}{5}=\dfrac{15\cdot14\cdot13\cdot12\cdot11}{5!}=\dfrac{360360}{120}=3003$.
Answer: The coefficient of $x^5$ is $3003$.
Find the 6th term from the end in the expansion of $(a+b)^{12}$.
Solution- There are $n+1=13$ terms; the 6th term from the end is the $(13-6+1)=8$th term from the start.
- For the 8th term set $r=7$: $T_8=\binom{12}{7}a^{12-7}b^{7}=\binom{12}{7}a^5b^7$.
- $\binom{12}{7}=\binom{12}{5}=792$.
Answer: The 6th term from the end is $T_8=792\,a^5b^7$.
Find the middle term in the expansion of $\left(\dfrac{x}{3}+9y\right)^{8}$.
Solution- $n=8$ is even, so the single middle term is at $\frac{n}{2}+1=5$, i.e. $r=4$.
- $T_5=\binom{8}{4}\left(\dfrac{x}{3}\right)^{4}(9y)^{4}=70\cdot\dfrac{x^4}{81}\cdot 6561\,y^4$.
- $\dfrac{6561}{81}=81$, so $T_5=70\cdot 81\,x^4y^4=5670\,x^4y^4$.
Answer: The middle term is $T_5=5670\,x^4y^4$.