Predicting product of amine elimination
In chemistry, you don't solve things like that; you just recall the right class of reactions (Hofmann elimination in this case) and apply that knowledge. You can hardly expect to rediscover that from the first principles. Knowledge about other classes of organic compounds and their behavior in the presence of a base is not particularly helpful either. It is not until much later that those seemingly random pieces of data start to fit into a bigger picture.

As for the mechanism, it is all there in your second picture. Indeed, that $\ce{OH-}$ would readily snatch a proton from an ammonium cation $\ce{NH4+}$, only there is no ammonium, it is a substituted ammonium, and we don't have any H linked directly to N. So we go for the next best thing and grab a proton from some carbon in $\beta$ position, simultaneously with the formation of a double bond.

Note the reversed regiochemical preferences as compared to Zaitsev-type elimination, which has a different mechanism, usually involving the appearance of a carbocation. (Not that it matters much in your case, since we only have one option anyway.)