Finding the ratio of lengths