...your 1st pic >>>
So there’s good news, and there’s bad news: The good news is adult fungus gnats only live about one week. The bad news is that in this short time, the female will deposit 100-150 eggs on your plant’s soil surface. These eggs are laid in strings of three to 40 and can hatch within four days of being laid!
The emerging larvae are clear to creamy-white and can grow to about 5 ½ millimeters long. They have shiny black head capsules. The larvae feed on tasty root hairs in the upper 1 centimeter of the soil, then work their way up into the plant stem. (They also love to feed on the roots of your newly planted seed, so watch those seed-starting trays in spring!) The larvae feed on highly organic soils, too. After feeding for approximately 14 days, the larva pupates. In about three and a half days, an adult will emerge from the case. The total life cycle takes two to four weeks.
...2nd pic idk.