When the particle is fired up, it has an initial velocity greater than zero.

As the particle goes upward, the force of gravity is constantly acting on it, accelerating it downward. In effect, this is "decelerating" the particle. Its initial velocity is slowing down until eventually it reaches zero. When it does reach zero, it is no longer going up, but it is also not going down (no velocity is no velocity). This is the peak of its flight, and the maximum height it achieves.

After a moment though, as gravity is still and always acting on it, the velocity continues to decrease, from zero to negative values. Since its velocity is zero, this is the part of the flight where the particle is going down, back to earth. This is always true for the y-component of the velocity (the x-component doesn't change, and in this case it is always zero).

So by finding the time it takes the particle to accelerate to zero from the initial velocity, then you are really finding the time of the first half of the flight, the part where the particle is going up. Since the second half (coming down) takes exactly the same amount of time, all you need to do is find the first part and double it.