I have reasons to believe that for any four square matrices $A, B, C, D \in \mathcal{M}_{n}(\mathbb{R})$, and $\lambda \neq 0$, the following is true: \begin{equation} \left.\ \begin{aligned} A^TD-C^TB &=\lambda I_n \\ A^TC &=C^TA\\ B^TD&=D^TB \end{aligned} \right\} \quad \iff \quad \left\{ \begin{aligned} AD^T-BC^T &=\lambda I_n \\ AB^T &=BA^T\\ CD^T&=DC^T \end{aligned} \right.\ \end{equation}
I have tried to tackle a proof or find a counterexample, but I haven't been able to do either. I would appreciate any indications or help. Thank you in advance :)
For context, both conditions have appeared when I tried to study whether the following linear transformation: \begin{equation} \left\{ \begin{aligned} Q&=Aq+Bp\\ P&=Cq+Dp \end{aligned} \right.\ \end{equation} where $p,q,Q,P \in \mathbb{R}^n$ are supposed to represent old and new coordinates and momenta, respectively, is canonical in the sense of classical mechanics. Specifically, I obtained the first set of conditions after forcing $\sum_{k}(\lambda p_k dq_k-P_k dQ_k)$ to be an exact differential, while the second one appears if one sets $[Q_i,Q_j]=[P_i,P_j]=0, [Q_i,P_j]=\lambda\delta_{ij}$ for the Poisson brackets of the new coordinates. I have studied that both these conditions characterize a canonical transformation, hence the question.