Show that if $B^2 x = 0_n$ for some vector $x \neq 0_n$, then $B$ is not invertible
A linear transformation in finite dimensional space is injective iff its kernel is trivial. So we have to find a non-trivial element in the kernel.
If $B^2 x = 0$, then $B(Bx) = 0$, so $Bx \in \ker B$.
Suppose $Bx = 0$, then this shows that $B$ has a non-trivial kernel, hence is not injective.
Suppose $Bx \neq 0$ above, then $Bx$ is a non-trivial element of $\ker B$, so it is not injective for $n \geq 3$.
Hence, either way it follows that $B$ is not injective.
VIA CONTRAPOSITIVE : If $B$ is injective, then so is $B^2$, but then $B^20 = 0$, so $B^2x$ cannot be zero for any other $x$ by injectivity. Note that we can extend this to $B^nx = 0$ implies $B$ is not injective.
If $B^2x=0$ for some non-zero vector $x$, then $B^2$ is not invertible, so $\det(B^2)=0$.
But $\det(B^2)=\det(B)^2$, so $\det(B)=0$ and $B$ is not invertible.
Another way to look at this is by contrapositive: suppose $B$ is invertible. Then $B^2$ is invertible, so $B^2 x = 0$ only for $x=0$.