Time taken by planets to collide I'm actually kind of confused with two different conclusions from two different sources. It would be great if some make it clear to me.
First, see this stack post : The Time That 2 Masses Will Collide Due To Newtonian Gravity. In this post see the following answer.
It's said that
$$
t = T/2 = \frac{\pi a^{3/2}}{\sqrt{\mu}} = \pi\sqrt{\frac{r_0^3}{8G(M+m)}}.
$$
First I don't understand How $t=T/2$. As the orbital period is the time taken to go from the apocentre (the point of greatest distance) to the pericentre (the point of smallest distance) and back. And in time $t$ the planet can only go from apocentre to pericenter so that should be $T/4$.

We are given the following problem as an assignment:

A binary system consists of two stars of equal mass $m $ orbiting each other in a circular orbit under the influence of gravitational forces. The period of the orbit is $\tau$. At $t=0$, the motion is stopped and the stars are allowed to fall towards each other. After what time $t$, expressed in terms of $\tau$, do they collide?

No from the above reasoning, it looks like it's directly
$$t=\frac{\tau}{2}$$
But it's not! The solution to a given problem is done as



Now the problem as I can see is with the use of the major axis and semi-minor axis.

In stack post!

Here $r_0$ which is an initial separation between the planet is taken as $major axis$ which seems reasonable.

In Picture show

Here first the time period written is in term of the semi-major axis. and this is taken as the initial distance between the planets which is kind of confusing. I don't get how this is?
Can Anyone point out flaws in either of the two?
 A: Both answers are correct and equivalent, but they are in terms of different orbital systems.
There are two separate orbits in your question.
The first (homework) orbit has 2 stars in a mutual circular orbit with an orbital period of $\tau$, and semi-major axis $a_1$.
The second (stack exchange) orbit has 2 stars on a collision course with an orbital period of $T$ and semi-major axis of $a_2=a_1/2$.

By Keppler's 3rd law, $p^2/a^3$ is constant for 2-body orbital systems with the same relative masses, where $p$ is the orbital period and $a$ is the semi-major axis, so $\dfrac{\tau^2}{a_1^3} = \dfrac{T^2}{a_2^3} = \dfrac{T^2}{(a_1/2)^3} $.  This simplifies to $\tau = 2\sqrt{2}T$.
The physics stack exchange answer gives collision time as $t= \dfrac{T}{2}$ and the Homework problem gives collision time as $t= \dfrac{\tau}{4\sqrt{2}}$.  These answers are equivalent since $\tau = 2\sqrt{2}T$.
As for your other question:

I don't understand How t=T/2. As the orbital period is the time taken
to go from the apocentre (the point of greatest distance) to the
pericentre (the point of smallest distance) and back. And in time t
the planet can only go from apocentre to pericenter so that should be
T/4.

If a round trip takes time T, then a one-way trip takes time T/2 (at least with respect to Keplerian orbits).
