Since you proved similar triangles earlier on
From (i)
q / 8 = 27 / p
(Corresponding sides of similar triangles are in proportion)
From (ii)
q / p = p / 8
(Corresponding sides of similar triangles are in proportion)
Then you show that there is a common ratio by using T2 / T1 = T3 / T2 or similar