So you always want y in front of the equation no matter what so you have x +2y=5 so you take the x and you subtract it to both side making it 2y= 5-x so then you just have to take the 2 to both side so you have to divide it and you will get y= 5/2-x/2 so then to graph it you start with the b which is -x/2 so you go down -1 and over 2 and place your dot adn then go up 5 over 2 and then place you dot and connect them together
You can plug in the numbers like 2=3(6) + b then rearrange for b so 2-18=b so the answer to your question is y=3x-16