Belly attachment tesuji
The belly attachment does the trick. In this particular situation, it is known as attaching at the belly of the weasel (in Japanese, itachi no hara-zuke). Itachi no hara-zuke is considered a proverb, probably best translated as "Attach at the belly of the weasel [in situations like this].
After the continuation to , which of course Black would not play out, White wins the capturing race.
Persevering with makes it ko. The ko is very disadvantageous for White. There is no need to make it ko if you can win unconditionally. could also be at a. The continuation is left as an exercise. It's still a ko.
Note that this problem is a different beast altogether! For the solution, see two stone corner squeeze.