Write down a basis $(e_1,\ldots,e_6)$ for $D_2$, using skew-symmetric matrices of size $4$. The vector space of such skew-symmetric matrices $X$, with $X+X^t=0$ has dimension $\frac{4\cdot 3}{2}=6$. The Lie brackets of such matrices $X,Y$ are given by commutator, i.e., by $[X,Y]:=XY-YX$.
Then write down the Lie brackets of $A_1\times A_1$ in terms of a basis $f_1,\ldots,f_6$. In fact, the brackets are given as follows:
$$
[f_1,f_2]=f_3,\, [f_1,f_3]=-2f_1,\, [f_2,f_3]=2f_2,
$$
$$
[f_4,f_5]=f_6,\, [f_4,f_6]=-2f_4,\, [f_5,f_6]=2f_5.
$$
Now construct a Lie algebra isomorphism $\phi\colon D_6\rightarrow A_1\times A_1$ in an obvious way (or compute it directly by the rule $\phi([x,y])=[\phi(x),\phi(y)]$). One can choose such a linear map $\phi$, with nonzero determinant, i.e., a Lie algebra isomorphism.