Suppose the first rectangle (call it $R$) has vertices $(0,0),\, (a,0),\, (a,b),\, (0,b).$ Then, if I have understood your question correctly, we want to find the minimum area of another rectangle, $R'$ say, containing $R$. We assume that the vertices of $R$ touch the edges of $R'$. We determine the area of $R'$ given that it is at an angle of $0\le\phi<\frac\pi2$ to $R$.
When rotated by an angle $\phi$, the vertices of $R$ become
We draw $R'$ with sides parallel to the axes so it has width
Therefore it has area
$$A=(a\sin\phi+b\cos\phi)(a\cos\phi+b\sin\phi) = ab + (a^2+b^2)\sin\phi\cos\phi$$
but we note that $\sin\phi\cos\phi=\frac12\sin2\phi$ so the area is minimised when $\phi=0,\frac\pi2$ and takes a value of $ab$.