finding sides of a triangle when circumradius and inradius are given 
The radius of the circumscribed circle of a right triangle is $15 cm$ and the radius of its inscribed circle is $6 cm$. Find sides of triangle.

From another site I got,  $c=30$, $a+b=2(15+6)=42$. $a+b+c=72$. $ab=6\times 72=432$. So, sides are $18$, $24$.
I didn't get how we wrote $a+b$ and $ab$ equations. What's the relation of sum and product of sides with circumscribed and inscribed radii.

Cracked by Adarsh (8th grade)
Step by step process: 
1) For a Right Angled Triangle, 
if Circumradius (R) = 15 then 
Hypotenuse (c) = 2*R = 2*15=30 CM
2) For a Right Angled Triangle, 
Inradius (r) = (a+b-c)/2 
==> 6 = (a+b-30)/2 
==> a+b=42   
3) Area = s*r = (a+b+c)*r/2= (a+b+30)*6/2 = (a+b+30)*3 = (42+30)*3 = 216 sq.Cm
4) Area = ab/2 
==> ab = 2* Area = 2 *216 = 432 Sq.Cm
5) a^2 + b^2 = c^2 
==> a^2 + b^2 = 900 
6) (a+b)^2 = a^2 + b^2 + 2a*b = 900 + (2*432) = 1764 = 42^2 
==> a+b=42
7) (a-b)^2 = a^2 + b^2 - 2a*b = 900 - (2*432) = 36 = 6^2 
==> a-b=6
8) solving 6 and 7, 
a = 24 and b = 18 
c = 30 (ref step 1)
