The fuqaha’ differed concerning the ruling on interacting with a person whose wealth is a mixture of halaal and haraam when it comes to buying and selling, accepting gifts, eating food, and so on. There are several opinions, the strongest of which are two:
The first opinion is that it is not haraam to accept gifts from him and to interact with him; rather it is makrooh. This is the view of the Shaafa‘i and Hanbali madhhabs, and was favoured by Ibn al-Qaasim among the Maalikis.
An-Nawawi (may Allah have mercy on him) said:
If the purchaser’s wealth is a mixture of halaal and haraam, and he (the seller) does not know where the money he is paying came from, it is not haraam for the person to whom it is given. But it is better not to take it. This idea is emphasised to a greater or lesser extent depending on the proportion of haraam in the purchaser’s money.
End quote from al-Majmoo‘, 9/344
Ibn Qudaamah (may Allah have mercy on him) said:
If a person buys from someone whose wealth is a mixture of halaal and haraam, such as an unjust ruler or one who deals with riba (usury), if he knows that the item for sale comes from the halaal portion of his wealth, then it is halaal; if he knows that it is haraam, then it is haraam, and what the seller says should not be taken as the basis for the ruling. In principle, whatever a man has is his, so if one does not know whether the item he is buying is from the halaal or haraam portion of his wealth, then we regard it as makrooh, because of the possibility that it may be haraam, but the transaction is not regarded as invalid, because of the possibility that it may be halaal, whether the haraam portion is great or small. This is the cause of the doubt concerning the ruling, and this doubt is commensurate with the portion of haraam involved; the greater or lesser the portion of haraam, the greater or lesser the doubt is. Ahmad said: I do not like him to eat from it (food the source of which is not known).
End quote from al-Mughni, 4/201
See also: ash-Sharh al-Kabeer, 3/277
The second opinion is to look at what forms the greater portion of his wealth. If the greater portion of his wealth is halaal, it is permissible to deal with him, but if the greater portion of his wealth is haraam, then it is not permissible. This is the view of the Hanafis and Maalikis.
Ibn Nujaym (may Allah have mercy on him) said:
If the greater portion of the giver’s wealth is halaal, then there is nothing wrong with accepting his gift and consuming his wealth, so long as it is not clear that it is from the haraam portion thereof. If the greater portion of his wealth is haraam, he should not accept his gift or consume his wealth, unless he says that it is halaal, and he inherited it or borrowed it.
End quote from al-Ashbaah wa’n-Nazaa’ir, p. 96
Some of the scholars are of the view that it is haraam to deal with someone whose wealth is a mixture of halaal and haraam. This was the view of Asbagh among the Maalikis.
But Ibn Rushd said: The opinion of Asbagh is extreme.
End quote from al-Bayaan wa’t-Tahseel, 18/194
The more correct view is that it is permissible to deal with him and to accept his gifts.
This is the opinion that is regarded as most correct by most contemporary scholars.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
It is proven from the Messenger of Allah (blessings and peace of Allah be upon him) that he accepted a gift from a Jewish woman when she gave him a (roasted) sheep during the campaign to Khaybar; the Prophet (blessings and peace of Allah be upon him) accepted the invitation of the Jewish man in Madinah who invited him to eat barley bread and fat. And he dealt with the Jews, buying and selling, to such an extent that when he died his shield was being held in pledge with a Jewish man for some barley that he had bought for his family. This indicates that it is permissible to deal with someone whose wealth includes that which is haraam, because the Jews – as Allah, may He be exalted, described them – “(like to) listen to falsehood, [and] to devour anything forbidden” [al-Maa’idah 5:42].
End quote from Fataaawa Noor ‘ala ad-Darb.
See also the answer to question no. 39661
Based on that, there is nothing wrong with you accepting gifts from your friend and eating his food.
But if your refusing to do so will have an impact on him and his father, and will motivate them to repent, then in that case you have to refuse.
And Allah knows best.