Which scripture prescribes this and is it believed that feeding Brahmins on earth effectively feeds the departed ancestors in Pitr Loka?
Manu smriti 3.125. One must feed two (Brahmanas) at the offering to the gods, and three at the offering to the manes, or one only on either occasion; even a very wealthy man shall not be anxious (to entertain) a large company
Prescribed in all the Smritis, that deal with Vedic rituals.
Manu Smriti further states:
3.144. (If no learned Brahmana be at hand), he may rather honour a (virtuous) friend than an enemy, though the latter may be qualified (by learning and so forth); for sacrificial food, eaten by a foe, bears no reward after death.
3.145. Let him (take) pains (to) feed at a Sraddha an adherent of the Rig-veda who has studied one entire (recension of that) Veda, or a follower of the Yagur-veda who has finished one Sakha, or a singer of Samans who (likewise) has completed (the study of an entire recension).
3.146. If one of these three dines, duly honoured, at a funeral sacrifice, the ancestors of him (who gives the feast), as far as the seventh person, will be satisfied for a very long time
So, feeding qualified Brahmins during ancestral ceremonies pleases the manes.
Also, it's not that the manes partake of the food from their own loka. They actually visit the place, where the Shraddha is being performed.
It is said that the Brahmins, who are being fed, should not speak while eating and also should not say anything about the quality of the served food. And, if those conditions are met, the manes consume the food along with the invited Brahmins.
3.236. All the food must be very hot, and the (guests) shall eat in silence; (even though) asked by the giver (of the feast), the Brahmanas shall not proclaim the qualities of the sacrificial food.
3.237. As long as the food remains warm, as long as they eat in silence, as long as the qualities of the food are not proclaimed, so long the manes partake (of it).
EDIT: Here is a response to the following comment by user river -
I have checked the verses provided by you in the question , the word "Brahman"is not present in any of the verse . Only in 3.236 , the word "dwija"is present. And Brahman , Kshatriya and Vaishyas all are dwija castes. – river 10 hours ago
It is well known that in Shraddhas Brahmins are required to be fed. If the word Brahmin is absent from some verses then you need to check previous verses from the same Chapter (i.e Chapter 3).
For example things get clear once we check 3.124 and 3.125.
3.124. I will fully declare what and how many (Brahmanas) must be fed on that (occasion), who must be avoided, and on what kinds of food (they shall dine).
3.125. One must feed two (Brahmanas) at the offering to the gods, and three at the offering to the manes, or one only on either occasion; even a very wealthy man shall not be anxious (to entertain) a large company
Therefore, "feed at least three Brahmins during Shraddhas" is the general rule.