Not that it is of any importance, but I just saw/realized that Lucas asked for a function that returned the second element, given the first. And I mistook it for the other way around. So this is just to set my record straight :)
In[1]:= theList = {{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {x3, y17}};
In[2]:= f[alist_, x_] := Cases[alist, {x, _}]
In[3]:= f[theList, x3]
Out[3]= {{x3, y3}, {x3, y17}}