Loose intake tube

Look at the red circled areas. The right side is fine, but the left side (in the picture) popped off and I can't seem to get it back in. Not sure if its held on by clips or something.
Here's a picture from the front view through the mouth exposed through front grille. You can kinda see how its not connected to together and shifted to one side.

Also, what is the function of the circled blue part in the first picture? That part isn't closed as tightly as it should be either. The plastic flap is slightly cracked on one of its hinges.
\I bought this car from another person so I have no idea how this happens.







