We have smaller rectangle inscribed in the bigger rectangle as shown on the picture.
The bigger outer rectangle is inclined for a certain angle. We know height and width of the bigger rectangle and we know angle of incline. Also we know that sides ratio of the both rectangles is the same.
How to find dimentions of the inner rectangle?

I added a coordinate grid to the situation. The lengths of the red rectangle are $a$ and $b$, the angle is $\gamma$. I slid the blue rectangle to the left, so that it is positioned with one vertex on the origin $(0,0)$ as shown in the picture.
To calculate the dimensions of the blue rectangle, we want to find the coordinates of the point $(x_0, y_0)$. First we need to find the equation $y=mx+q$ for the line. We note that there is a rightangled triangle with $\gamma$ as an agle, such that $$ \cos(\gamma)=\frac{b}{q} $$ and the slope is $$ m=\tan(\gamma) . $$ We get $$ y = \tan(\gamma) x + \frac{b}{\cos(\gamma)} $$ for the line. The point $(x_0,y_0)$ has to satisfy $$ \frac{-x_0}{y_0} = \frac{a}{b} $$ and as it lies on the line, we get $$ -x_0\frac{ b}{a} = \tan(\gamma) x_0 + \frac{b}{\cos(\gamma)}. $$ Rearranging results in $$ x_0 =\frac{-b}{\cos(\gamma) \left(\frac{b}{a}+\tan(\gamma) \right)} $$ and $$ y_0=\frac{b^2 }{a \cos(\gamma)\left(\frac{b}{a}+\tan(\gamma)\right)}. $$