Let teh function be of the type y=ax+b
we have two cases:
CASE I .. increasing function
then f(-2) = 10 and f(4) = 15
So, -2a + b = 10 ... (1)
4a + b = 15 ... (2)
solving, we get a = 5/6 and b = 35/3
So, y = 56x + 353
CASE II .. decreasing function
then f(-2) = 15 and f(4) = 10
solving , we get a = -5/6 and b = 35/3
so, y = -56x + 353
these are the two functions