Ok, two triangles are similar when they both have the same angles. This condition is fullfilled when the quotients between the sides of one of the triangles and their correspondents of the other give all the same value, in this case:
So we need to find n using that: