There are multiple solutions that satisfy the objective of the problem, however this is the one that results in the least loss for Black.
makes a straight three. If makes a placement, then makes and miai. After , Black connects to the outside stone and escapes, and by conventions in life and death, is considered successful.