$7$ people in a line $7$ people including $A$ and $B$ are to be lined. What is the probability if there will be $1$ person between $A$ and $B$? The answer is written as $$\frac{5!\cdot3!}{7!}$$ but I am not sure whether it is true. There is also a similar question here,
but there is no clear explanation for that question too.
 A: No, the answer you have is not correct. The numerator should be $5\cdot 5!\cdot2$ instead of $5!\cdot3!$. One way to see this is:
Choose one person from the remaining $7-2=5$ to put between $A$ and $B$. This can be done in $5$ ways. No consider these three three persons $AXB$ as one and so you have $4$ other persons to be put in order - $5$ in total with this (tripple) one. This can be done in $5!$ ways. Now, we have counted only arrangements with $AXB$ but $BXA$ would be also ok, so double the possible ways. In sum we have $5\cdot 5!\cdot 2$ favourable ways. The possible ways are $7!$ which gives the answer $$\frac{5\cdot5!\cdot2}{7!}=\frac{10\cdot5!}{5!\cdot6\cdot7}=\frac{5}{21}\approx0.238$$

Another way (more safe to avoid mistakes) is the following:


*

*Place person $A$ on position $1$ and person $B$ on position $3$. Now put the other persons in the $5$ remaining positions with $5!$ ways.

*Repeat with positions $2$ and $4$, $3$ and $5$, $4$ and $6$ and $5$ and $7$. This gives you up to now $5\times 5!$ favourable ways. But wait they are all of the form $AXB$. So double them because $BXA$ is also ok. 


So, you have $5\times 5!\times 2$ favourable ways and they are all. Divide with the possible ways $7!$ to conclude.
A: You already have many answers, I am giving another just to emphasize that for probability problems, it is often easier to count combinations rather than permutations.
With $2$ "specials" and $5$ "others", it is easy to see that there are just $5$ favorable "sandwiches"
$\large\circ\bullet\circ\bullet\bullet\bullet\bullet\quad\bullet\circ\bullet\circ\bullet\bullet\bullet\quad\bullet\bullet\circ\bullet\circ\bullet\bullet\quad\bullet\bullet\bullet\circ\bullet\circ\bullet\quad\bullet\bullet\bullet\bullet\circ\bullet\circ$
against $\binom72 = 21$ total combos,
thus $Pr = \dfrac5{21}$
A: A and B are ordered in $2$ ways. Then the person between them can be selected in 5 ways. Being a $3$-people block, there are $5!$ possible permutations since $4$ people $+ 1$ block form. Then the number of such configuration is $10 \cdot 5!$ but there are $7!$ ways they can be arranged in general so the probability is $$\frac {10 \cdot 5!} {7!}.$$
A: Given five people they can be arranged in $5!$ ways. For each arrangement $A$ and $B$ can be either side of the first person or the second person or ... or the fifth person - five possibilities. $A$ can be before $B$ or after $B$ - two possibilities. As others have noted this is $5!\times 5 \times 2$ ways.
A: The arrangements are as below.  Let the person in between A and B be X
AXB----
-AXB---
--AXB--
---AXB-
----AXB
Given these in any one of them the X could be chosen in ${5\choose1}$ and the other 4 excluding AXB could be arranged in 4! ways. Also A and B could be permuted in 2! ways.  Thus for one case, there are $5.2.4! = 2.5!$ ways. Again multiply by 5 for all the five cases and that would be $5.2.5!$ ways.  The total numbers of ways 7 people could be lined up is 7! ways.
Thus the probability is $$\frac{5.2.5!}{7!}$$
