given x in range1, get y in range2