This was an old puzzle, and many of you had done it before. Many people sent the right answer, though many people sent wrong answers as well. Folks who did it correctly included Suman Saraf, Prakhar Prakash, Sid Mulherkar, Vishal Poddar, Abhinav Jain, Prateek Poddar and Amit Mittal. Well done all.
I am reproducing the answer from Sid Mulherkar, who explained it nicely.
Suppose you are one of the bugs. According to you one bug is directly moving towards you at all times with a constant speed. Since you are moving perpendicular to the bug following you at all times, there is no component of your velocity that is moving towards or away from the bug following you. Hence this means that the time taken for the bugs to meet will be the same as the time taken for one bug to just travel 10 cm (the side of the square). Hence the answer will be 10/v where v is the speed of the bug. A more rigorous solution can be found using calculus, but this also suffices for this problem. I have tried the problem with unsymmetrical shapes(trapezium, rectangle, etc.)..In this I believe calculus is required.
here is also a diagram that shows what the path will be like:
The puzzle can be more tantalizing and require higher level concepts if we convert the shape from a square to a triangle or other shapes (As Sid also pointed out). The interested reader can read more about it at the following link:
Hope you all enjoyed the puzzle!