Solution (source code)

= Solution

For eigenvalue zero take $s_1=(1,0)^T$. For eigenvalue $3/8$, the first row of $(B-3I/8)s_2=0$ gives $x=-2y$, so take $s_2=(-2,1)^T$. These are <linearly independent> <eigenvectors>, giving
$$
\boxed{S=\begin{pmatrix}1&-2\\0&1\end{pmatrix},\quad
S^{-1}=\begin{pmatrix}1&2\\0&1\end{pmatrix},\quad
D=\begin{pmatrix}0&0\\0&3/8\end{pmatrix}.}
$$
The identities $Bs_i=\lambda_i s_i$ give $BS=SD$, hence the required <diagonalization> $S^{-1}BS=D$.