The two figures are similar because the one on the left is the same as the one on the right when it comes to it's angles. So you can use this as a reason to divide 12mm by 3mm to see how many times bigger the shape on the left is to the one on the right.
The number you get is 4.
The next an final step is to do 4 divided by four to get the answer for "r" which is 1mm.
There are 6! possible permutations of the blue books, 2 possible permutations of the red books, 4! possible permutations of the green books and 3! possible permutations of the three color groups. therefore the total number of ways of arranging the books is given by: