Four ratios:
light to dark: 4:12
dark to light: 12:4
black to white: 2:4
white to gray: 4:10
gray to white: 10:4
any of those work.
the answer to your question is x= -2
The slope of a graph is rise over run. So count how many units up you move and put that over how many units right you move. If you are moving down or to the left it would be negative.