Note that when you do these problems the corners and colors are randomized, so asking about “white / black” or a particular coordinate won’t always make sense to others.

In the case of your problem, if the opposing color pushes through (M18 in your case), you simply descend to the first line (N19). Then you can’t be put in atari from either side, because of a shortage of liberties. That gives you enough time to kill. There’s a connect-and-die to your right and a snapback to your left.