one friend is riding his bicycle at the speed of 10m/sec and another friend is riding the bicycle from the opposite direction on same way at same speed and bug is in the middle.what is the distance the bug actually flies before squished.

Simple. How long does it fly in the air? time= distance/combinedspeed= distance/20

You didn't say the distance, but put that in, and figure time.

Now how far does the bug fly? distance=speedbug*timeflying

you didn't put the speed of the bug in the problem either.

To find the distance the bug actually flies before being squished, we need to determine the time it takes for the bug to be squished.

Let's break down the scenario:
- Friend A is riding the bicycle at a speed of 10 m/s,
- Friend B is riding the bicycle in the opposite direction on the same way at the same speed (10 m/s).

When the bug starts at the middle, it essentially gets caught between the two friends moving towards each other. We can assume that the bug gets squished when it reaches one of the riders.

Since both friends are moving at the same speed, it means they are covering a combined distance of 10 + 10 = 20 meters every second. This means that the bug has 1 second from the moment it starts to move before it is squished.

Therefore, the bug actually flies for 1 second, covering a distance of 10 meters before being squished.