Solution (source code)

= Solution

\b[Euler number and self-intersection.] Orient the rank-two <normal bundle> $\nu_S$ by the orientations of $S$ and $M$: the ordered tangent and normal spaces have the ambient orientation. Choose a smooth normal section $s$ transverse to the zero section. Its zeros are isolated, and their signed number is the evaluation $\langle e(\nu_S),[S]\rangle$ of the <Euler class> on the <fundamental class>. Scale the section sufficiently small to lie in a <tubular neighborhood>. Its graph is a push-off $S'$ isotopic to $S$.

The intersections of $S$ with $S'$ occur exactly at the zeros of $s$. In a positively oriented local splitting $TS\oplus\nu_S$, the basis formed from the tangent spaces to $S$ and to the graph has block matrix
$$
\begin{pmatrix}I&I\\0&Ds\end{pmatrix}.
$$
Its <determinant> is $\det Ds$, so the local intersection sign is precisely the local zero index of the section. Summing proves the <Euler number equals self-intersection> identity
$$
\boxed{\langle e(\nu_S),[S]\rangle=S\cdot S'=[S]\cdot[S].}
$$

\b[The conic.] The given map is the degree-two <Veronese map> $[u:v]\mapsto[u^2:uv:v^2]$ followed by the <projective linear transformation>
$$
A=\begin{pmatrix}1&0&1\\0&1&0\\1&0&-1\end{pmatrix},
\qquad \det A=-2\ne0.
$$
The <Veronese map> is injective with nonvanishing differential: on the chart $u\ne0$ its coordinates are $[1:t:t^2]$, and on $v\ne0$ they are $[s^2:s:1]$. It is therefore a <smooth embedding>, and $S$ is a <smooth plane conic> diffeomorphic to $\mathbb{CP}^1\cong S^2$. Its equation in the given coordinates is $z_0^2-z_2^2=4z_1^2$.

Let $L$ be a projective line, with its complex orientation. The <cohomology ring of complex projective space> gives $[L]\cdot[L]=1$ in $\mathbb{CP}^2$. The hyperplane $z_1=0$ meets $S$ at $[u:v]=[1:0]$ and $[0:1]$. The zeros of $uv$ are simple in the respective local coordinates, and complex intersections have positive signs. Hence $[S]\cdot[L]=2$, so $[S]=2[L]$. The <self-intersection number> and the normal <Euler class> are
$$
\boxed{[S]\cdot[S]=4,\qquad e(\nu_S)=4u,}
$$
where $u\in H^2(S^2;\mathbb Z)$ has $\langle u,[S^2]\rangle=1$.

\b[The boundary of the tubular neighborhood.] Write $N=\nu(S)$ for the closed disk <tubular neighborhood> and $E=\partial N$ for its boundary. This distinguishes the disk neighborhood $N$ from the vector <normal bundle> $\nu_S$. The space $E$ is the oriented <circle bundle> of $\nu_S$, with <Euler class> $4u$. The <Gysin sequence> contains
$$
0\to H^1(E;\mathbb Z)\to H^0(S^2;\mathbb Z)
\xrightarrow{\;\smile\,4u\;}H^2(S^2;\mathbb Z)
\to H^2(E;\mathbb Z)\to0.
$$
The middle map is multiplication by four, yielding $H^1(E;\mathbb Z)=0$ and $H^2(E;\mathbb Z)=\mathbb Z/4$. The same <Gysin sequence> gives $H^0(E;\mathbb Z)=H^3(E;\mathbb Z)=\mathbb Z$. The total space is a closed connected oriented three-manifold, so <Poincare duality> gives
$$
\boxed{H_k(\partial\nu(S);\mathbb Z)\cong
\begin{cases}
\mathbb Z,&k=0,3,\\
\mathbb Z/4,&k=1,\\
0,&\text{otherwise}.
\end{cases}}
$$

\b[The exterior.] Work first with $W=\mathbb{CP}^2\setminus\operatorname{int}N$. A <collar neighborhood> of $\partial W$ shows that its interior, the requested $\mathbb{CP}^2\setminus N$, has the same <homotopy equivalence> type: push the boundary a small positive distance into the collar. The <Excision theorem> and <Thom isomorphism theorem> identify
$$
H_k(\mathbb{CP}^2,W;\mathbb Z)
\cong H_k(N,E;\mathbb Z)
\cong H_{k-2}(S^2;\mathbb Z).
$$
Only degrees two and four are nonzero, each a copy of $\mathbb Z$.

In degree four the map $H_4(\mathbb{CP}^2;\mathbb Z)\to H_4(N,E;\mathbb Z)$ sends the ambient <fundamental class> to the relative <fundamental class> of $N$. Under the <Thom isomorphism theorem> this becomes $[S]$. Thus this map is multiplication by \b[one] with compatible orientations. The <long exact sequence in homology> gives
$$
0\to H_4(W;\mathbb Z)\to\mathbb Z
\xrightarrow{\;1\;}\mathbb Z\to H_3(W;\mathbb Z)\to0,
$$
so $H_4(W)=H_3(W)=0$.

In degree two, the <Thom isomorphism theorem> identifies the map $H_2(\mathbb{CP}^2)\to H_0(S^2)$ with intersection against $[S]$. A projective line intersects the conic twice, so this map is multiplication by \b[two]. The <long exact sequence in homology> is
$$
0\to H_2(W;\mathbb Z)\to\mathbb Z
\xrightarrow{\;2\;}\mathbb Z\to H_1(W;\mathbb Z)\to0.
$$
It yields $H_2(W)=0$ and $H_1(W)=\mathbb Z/2$. In degree zero the relative groups vanish, so $H_0(W)\cong H_0(\mathbb{CP}^2)\cong\mathbb Z$. This computes the <homology of the complement of a smooth conic>:
$$
\boxed{H_k(\mathbb{CP}^2\setminus\nu(S);\mathbb Z)\cong
\begin{cases}
\mathbb Z,&k=0,\\
\mathbb Z/2,&k=1,\\
0,&k\geq2.
\end{cases}}
$$
The normal Euler number $4$, the degree-two intersection map and the degree-four restriction map $1$ play different roles; distinguishing them explains why the boundary has first <homology> $\mathbb Z/4$ while the exterior has first <homology> $\mathbb Z/2$.