I'm reading Exercises in Classical Ring Theory (T.Y.Lam) and there is a exercise:

I'm not sure how to determine the left (right) dimension of the vector spaces (red underline in the above). My though is that:
- For $[K\cdot x : K]_r$ : the basis includes two vectors : $(xK; 0)$ and $(txK; 0)$.
- For $[D:K]_l$ : I can not determine the basis.
My question is: How can you determine the dimension of the vector spaces that are underlined?
If you can write $D=Ka_1\oplus Ka_2\oplus \cdots \oplus Ka_n$ with $a_i\neq 0$, then $[D:K]_l=n$. Likewise, if you can write $D=a_1K\oplus a_2K\oplus \cdots \oplus a_nK$ with $a_i\neq 0$, then $[D:K]_r=n$.
By definition, $D=K\oplus Kx$, so $[D:K]_l=2$, and in the proof it is shown that $D=K\oplus xK\oplus txK$, therefore $[D:K]_r=3$.