iIn a total time of 40 seconds, beetle K ran in a straight line for 30 cm and bumped into beetle J, (at this point beeltee K stopped) then beetle J ran for another 90 cm at 3 times the rate of beetle K. What was the rate of each beetle?

Let assume that speed of beetle K is s_{k} and it ran 30/s_{k} seconds. Then beetle J start running with speed 3s_{k} and ran 90/(3s_{k}) seconds. Because we know, that the total time of the relay is 40 seconds, we can write the equation:

30/s_{k}+90/(3s_{k})=40 ---> 30/s_{k}+30/s_{k}=40 ---> 60/s_{k}=40 ---> s_{k}=60/40

↓

30/s_{k}

So, the speed (rate) of beetle K is 1.5 cm/sec

beetle J is 4.5 cm/sec.