This amounts to solving an equation. For the case you illustrate (where we divide the longer side in half), you fall into one of two cases: if $b\gt 2a$, so that in the second rectangle the horizontal sides are still the longer sides, you want $\frac{b/2}{a}=\frac{b}{a}$. For this to occur, you would need $ba = 2ba$, which is impossible since both $a$ and $b$ are assumed positive.
If $b\leq 2a$, then in the second rectangle it is the vertical side that are longest, so you want $\frac{a}{b/2} = \frac{b}{a}$. This gives you $2a^2 = b^2$, or $\sqrt{2}a=b$ (since $a$ and $b$ are lengths, they will be positive). So, for example, if $a$ is $1$ in the first figure, you need $b=\sqrt{2}$.
Of course, it will all depend on what proportions you want. For example, one can consider the case in which you "cut off" a square of side length $a$ from your original rectangle, leaving you with a rectangle with sides $a$ and $b-a$. Then you would want this latter rectangle to have the same proportions as the original one, which means you want $\frac{b}{a}=\frac{a}{b-a}$ (turns out you cannot do it if $b-a\gt a$). This leads to an equation that you can solve for $b$ in terms of $a$ (or solve for $a$ in terms of $b$), giving you the proportions that the original rectangle must have. Etc.