Explanation:
since they are similar, the same scale factor must apply to every side.
so, it is sufficient to look on only one pair of corresponding sides.
16 × x = 40
x = 40/16 = 10/4 = 5/2 = 2.5
so, the scaling factor from the small to the large shape is 2.5 or 5/2.
it seems it is your choice which format of the 2 to use.