Answer: Amount invested in oil stocks is $9200.
Explanation:
Let the amount of money invested in fruit and vegetable stocks be 'x'.
Let the amount of money invested in oil stocks be 'y'.
So, Madelyn has invested $4000 more in 4% fruit and vegetable than 7% in oil stocks.
And sum of annual income from these stocks is $1172.
According to question, it becomes,

From eq(1), we get that

Put it in the eq(2), we get that

So, x= 4000+y
x=4000+9200
x=$ 13200
Hence, Amount invested in oil stocks is $9200.