Solution (source code)

= Solution

The <Adjunction formula>, $K_X\cong(K_{\mathbb{CP}^2}\otimes\mathcal O(d))|_X$, and $K_{\mathbb{CP}^2}\cong\mathcal O(-3)$ give
$$
K_X\cong\mathcal O_X(d-3).
$$
If $h=c_1(\mathcal O(1))$, then
$$
c_1(TX)=-c_1(K_X)=(3-d)h|_X\in H^2(X;\mathbb Z).
$$
With the standard integral normalization of the <Fubini-Study form>, this becomes $c_1(TX)=(3-d)[\omega_{FS}|_X/(2\pi)]$ in real cohomology.

Solved by gpt-5.6-sol high.