Rear gears first, as that's a straightforward fix.
The length of the cable between the shifter and the derailleur is too long. The cable probably pulled through the pinch bolt on the derailleur. First check the cable housing is properly inserted in the shifter, frame stops and the derailleur. Set the rear shifter to the highest gear; wind the barrel adjusters on the shifter and derailleurs in; loosen the cable pinch bolt; pull the cable though to take out all the slack; re-tighten the pinch bolt to secure the cable.
The front derailleur is a little tricky.
Something is obviously jamming the derailleur so that it will not move inwards under its spring tension when the shifter pays out cable - but - you say you can move the derailleur by hand, so the derailleur itself is not jammed. I think what is likely is that the cable is getting hung up somewhere near the derailleur. Possibly there is contamination in a section of housing, the cable has been kinked or has corroded. Some bikes also route the cable under the bottom bracket area in a slotted guide or through a hole in the frame, these can get clogged with dirt.
Inspect the cable run between the derailleur and where you see the cable going slack. Clean out any dirt, make sure the cable is running properly in any guides, check the cable for damage. You can remove the cable and clean and lubricate it, or replace it if it is kinked or damaged. If the cable runs through a section of housing before the derailleur you can replace that also.
You'll need to re-adjust both front and rear derailleurs after making the fixes. Park Tool Repair Help has good guides to help with that.