when you have the domain (for instance D = [0,5]) you fill this in for the formula (y = ax + b). so you will get y = 5a + b then you solve the problem for y. you do the same with the other part of the domain. this will give you two numbers. your range R is [the lowest number, the highest number]