The metal stub from the wall should have a washer inside the sip joint nut (red arrow):
Click to embiggen
If your plastic pipe simply slipped in, then either the washer is completely missing or has stretched to the point where it's no longer functional. This is an example of a replacement slip-joint nut and washer:
Image courtesy of lowes.com. Not endorsement implied or intended
This one happens to have a red rubber washer. Most of the ones I've used have been some sort of translucent white plastic. I'm not sure which is "better", but they both seem to work just fine. The sloped shoulder of the washer goes toward the pipe being attached to, while the square edge goes toward the nut and is tightened in place as the nut is tightened down.
Bonus suggestion:
To be honest, I'd suggest replacing that accordion pipe with a straight piece. The accordion pleats tend to collect gunk that leads to clogging, while the smooth inside of the straight pipe will collect much less.
To fit the straight pipe in there, you'd have to cut a fair bit off of the tail that goes into the metal pipe stub (you indicated about 8" - that's a lot!). Once that's much shorter, you can loosen the slip joint nuts on the P-trap and wiggle the joints around. I'm willing to bet you could get the trap inlet to line up directly below the drain tailpiece and won't need the accordion at all.
I've installed drain tailpieces with a very slight angle to get a smooth pipe in there and have been able to tighten the nuts down to avoid leakage. I do not recommend it, but it's possible to get away with it if you cannot get a 100% straight line. YMMV... The worst case scenario is that you'd have to reinstall the accordion pipe, but that it would be an almost straight drop down, giving food gunk a far smaller chance of getting caught in a pleat.