Let $X_1,X_2$ be two smooth hypersurfaces of degree $d$ in $\mathbb P^{n}$. Let $B=X_1\cap X_2$. Assume $B$ is smooth. Let $\mathcal N_{B/\mathbb P^n}$ be the normal bundle to $B$. Let $H$ be the class of a hyperplane in $\mathbb P^n$. Denote by $s_i$ the $i$-th Segre class of a line bundle.
Trying to generalize this example to higher dimensions, I am interested in computing $$s_{i-\mathrm{codim}(B,\mathbb P^{n})}(\mathcal N_{B/\mathbb P^{n}})(H\cdot B)^{n-i},$$ which should be an integer, for all $2=\mathrm{codim}(B,\mathbb P^n)<i\leqslant n$.
I am no expert in intersection theory, but it seems to me that this must be somewhat doable and I should be able to come up with explicit formulas depending on $d$ and $n$. My biggest trouble at the moment is understanding how to effectively compute the Segre classes and their intersection with subvarieties of the correct dimension.
Any comment or specific reference is appreciated, especially if it deals with similar examples for $n>3$. I have spent a considerable amount of time looking at Fulton's book in intersection theory as well as the notes by Einsenbud and Harris 'Intersection theory and all that' and Vakil's course in intersection theory but I did not make progress beyond here. I can write the problem in terms of Chern classes or use the standard short exact sequence to write it in terms of Chern classes of the tangent plane, but I did not get closer to getting a number.