The figures are similar, meaning the proportions will be the same, just with different measures.
We know 7 becomes 3.5, which means the second rectangle is half the size of the first one (because 7 divided by 2 is 3.5)
Therefore, to find the missing measure, or x cm, you have to divide 4 by 2, which is 2
Therefore, x=2