There are some people that would call it to bite, but it is wrong because you don't use the teeth.
Is there a verb or idiom for pressing with the lips?
This is called "pursed". In particular the second image illustrates this pretty well.
As some of the comments suggest, pursing can be ambiguous referring to outward/inward lip rolling. This following reference explains more, and explains the related body language signals (though, curiously, it all but omits the "pout").
"Pursed" lips are not to be confused with "pursed lip breathing", a technique used by folks suffering from COPD, et al, to achieve better air exchange in the lungs.
I think the best term is sucked in.
Here is the relevant definition from Changing Minds' glossary on body language, specifically lip positioning:
It needs to be understood that "pursed", which is the most common description of the action pictured by the OP, is different from "pursed lip breathing".
When someone "purses" their lips they squeeze them together tightly, slightly "sucked in". This is as opposed to the "pout" which is squeezing the lips together with them (especially the bottom lip) projecting outward, or a "pucker", which is what one does when preparing to kiss. Pursing the lips is typically associated with either deep thought/concern or some sort of disapproval. Pouting, on the other hand, is associated with disappointment -- it's what a small child does when he does not get his way. (You can work puckering out for yourself.)
On the other hand, "pursed lip breathing" is a technique used by people with asthma, COPD, and other breathing disorders which involves inhaling through the nose or through the open mouth, then breathing out through lips that are pressed fairly tightly together. This action increases the air pressure in the lungs and helps alleviate obstruction due to narrowed air passages. It can, oddly, make it possible for the individual to exhale more thoroughly (more "deeply") than when breathing out through the "normal" open mouth. While the term "pursed" is used in the description, the way the lips are held is somewhat different, and pictures of individuals practicing this technique will not resemble someone who is "pursing" his lips while, eg, trying to decipher what it is I just said above.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?