I tried one problem from "Introduction to Lie Algebras” by K.Erdmann and M. Wildon and there is one question regarding the Heisenberg Algebra that I am not sure how to do.
Assume first that L' is 1-dimensional and that L' is contained in Z(L). We shall show that there is a unique such Lie algebra, and that it has a basis f,g,z, where [f, g] = z and z lies in Z(L). This Lie algebra is known as the Heisenberg algebra.
Take any f, g ∈ L such that [f, g] is non-zero; as we have assumed that L' is 1-dimensional, the commutator [f, g] spans L'. We have also assumed that L' is contained in the centre of L, so we know that [f,g] commutes with all elements of L. Now set z := [f, g].
We leave it as an exercise for the reader to check that f,g,z are linearly independent and therefore form a basis of L
Suppose $az + bf + cg = 0$. Take the bracket with $f$ to get $cz = 0$, and hence $c = 0$ because $z \neq 0$. Take the bracket with $g$ to get $bz = 0$, and hence $b = 0$. Combining these we get $az = 0$ and hence $a = 0$. Therefore $z, f, g$ are linearly independent.