Hi DaalChawal,
First a diagram:
\begin{tikzpicture}[scale=2]
\def\u{2.5}
\def\v{3.75}
\def\x{1.5}
\def\f{1.5}
\coordinate[label=above: A] (A) at ({-(\u+2)},1.5);
\coordinate[label=below: D] (D) at ({-(\u+2)},-1.5);
\coordinate[label=above: B] (B) at (-\u,.5);
\coordinate[label=below: C] (C) at (-\u,-.5);
\coordinate[label=F] (F) at (-\f,0);
\coordinate[label=F] (F') at (\f,0);
\coordinate[label=below: A'] (A') at ({\v-\x},{-\x/2});
\coordinate[label=above: D'] (D') at ({\v-\x},{\x/2});
\coordinate[label=below: B'] (B') at (\v,{-\x/2});
\coordinate[label=above: C'] (C') at (\v,{\x/2});
\draw (-6,0) -- (5,0);
\draw[ultra thick] (0,-2) -- (0,2) node[ above ] {+};
\filldraw (F) circle (.03);
\filldraw (F') circle (.03);
\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw (A') -- (B') -- (C') -- (D') -- cycle;
\draw[yshift=-0.1cm, latex-latex] ({-(\u+2)},0) -- node[ below ] {2} (-\u,0);
\draw[xshift=-0.1cm, latex-latex] ({-(\u+2)},1.5) -- node[ above left] {3} ({-(\u+2)},-1.5);
\draw[xshift=-0.1cm, latex-latex] (-\u,0.5) -- node[ above left] {1} (-\u,-0.5);
\draw[yshift=-0.1cm, latex-latex] ({\v-\x)},{\x/2}) -- node[ below ] {$x$} (\v,{\x/2});
\draw[xshift=0.1cm, latex-latex] (\v,{\x/2}) -- node[ above right ] {$x$} (\v,{-\x/2});
\draw[yshift=-0.1cm, latex-latex] (-\u,0) -- node[ below ] {$u$} (0,0);
\draw[yshift=-0.1cm, latex-latex] (0,0) -- node[ below ] {$v$} (\v,0);
\draw[help lines] (B) -- (B');
\draw[help lines] (B) -- (0,0.5) -- (B');
\draw[help lines] (B) -- (0,{-\f/(\u-\f)*0.5}) -- (B');
\draw[help lines] (A) -- (A');
\draw[help lines] (A) -- (0,1.5) -- (A');
\draw[help lines] (A) -- (0,{-\f/((\u+2)-\f)*1.5}) -- (A');
\end{tikzpicture}Let $x$ be the side length of the square in the image.
Let $f$ be the focal length of the lens.
Let $u$ be the distance of $BC$ to the lens and let $v$ be the distance of its image to the lens.
Then $u+2$ is the distance of $AD$ to the lens, and $v-x$ is the distance of its image to the lens.
The magnification of an object, which is the size of the image over the size of the object, is the same as the image distance over the object distance.
So the magnification of $BC$ is: $\frac{B'C'}{BC}=\frac x 1=\frac{v}{u}$.
The magnification of $AD$ is: $\frac{A'D'}{AD} = \frac x 3 = \frac{v-x}{u+2}$.
Furthermore, the lens formula tells us that $\frac 1u+\frac 1v=\frac 1f$ and $\frac 1{u+2}+\frac 1{v-x}=\frac 1f$.
So:
\begin{cases}\frac x 1=\frac{v}{u} \\ \frac x 3= \frac{v-x}{u+2} \\ \frac 1u+\frac 1v=\frac 1f \\ \frac 1{u+2}+\frac 1{v-x}=\frac 1f
\end{cases}
Solve?