We are given the problem
\begin{equation}\label{primal}
\begin{aligned}
& \underset{x}{\text{minimize}} & & x^TA_0x+2b_0^Tx+c_0 \\
& \text{subject to} & & x^TA_1x+2b_1^Tx+c_1 \leq 0 \\
\end{aligned}
\end{equation}
where the $A_i$ are symmetric matrices which are NOT asssumed to be positive semi-definite; this is why this is a non-convex optimisation problem.
I am able to derive its dual problem using Schur complement trick as
\begin{equation}\label{dual}
\begin{aligned}
& \underset{\gamma, \lambda}{\text{maximize}} & & \gamma \\
& \text{subject to} & & \lambda \geq 0 \\
& & & \begin{bmatrix}A_0+\lambda A_1 & b_0 + \lambda b_1 \\ (b_0 + \lambda b_1)^T & c_0 + \lambda c_1 - \gamma\end{bmatrix} \succeq 0
\end{aligned}
\end{equation}
Now the reference claims that the dual problem of the SDP is an SDP with variables $X\in S^n, x\in R^n$
\begin{equation}\label{dualdual}
\begin{aligned}
& \underset{x, X}{\text{minimize}} & & {tr}(A_0X)+2b_0^T x + c_0\\
& \text{subject to} & & {tr}(A_1X)+2b_1^Tx+c_1 \leq 0\\
& & & \begin{bmatrix}X & x \\ x^T & 1\end{bmatrix} \succeq 0
\end{aligned}
\end{equation}
How can I derive this?