The diagram tells us 3 things: the right angle and the two corresponding side measurements. Because the side measurements are corresponding, we can set a proportion:
6/9=9/15
If this proportion is true, it means the triangles are similar. If this proportion is impossible, it means the triangles are no similar.
To calculate this, we use cross multiplication.
6/9=9/15
6*15=9*9
90=81
90 does not equal 81 making this proportion impossible, which concludes that these two triangles are not similar.
I hope this helps! Please comment if you have any questions.