This is actually the following Shanti PAtha from the Upanishads. I find it at the start of the Ishopanishad, which is part of the Shukla Yajurveda's VAjansaneyi SamhitA.
Om purnamadah purnamidam purnAt purnamudachyate |
purnamAdAya purnamevAvasghishyate ||
That (or the Parabrahaman) is full; this (or the Brahman which is
NAma Rupastha i.e which is having name, form) also is full; From fullness
comes fullness; When fullness is extracted (or removed) from fullness (that is
removing Purnatva from KArya-Brahman), only fullness (i.e KArana Brahman or the Parabrahman) remains.
Adah ---- That; which is denoting here the Brahman that is established in Paroksha Rupa or KArana Rupa i.e as the cause and not the effect.
Idam --- This ( i.e the Brahman which is manifested with name forms. Which resulted from the cause, but it's still the same Brahman, so both are eqaully full or infinite).
So, both are the same Brahman, with one in the form of cause (KArana) of everything and another as the KArya or the effect of that cause. This later one is having NAma-Rupa.
Now, this following line says, when we get the required knowledge (VidyA), which removes the ignorance or veil that make us to differentiate between this two so-called types of the same Brahman, then only the Brahman (which is the cause of everything) is that which remains.
Purnashya purnamAdAya purnamevAvasghishyate ||
purnamevAvasghishyate- Purnam eva (only Brahman who is the cause) avashishyate (remains).
This also explains a mathematical concept that taking infinity out of infinity, only infinity remains. Purna means "full" or "infinite".
See the following Mantra from the Atharva Veda, which also says the same:
PurnAt Purnam udacchati purnam purnena sicyate || OR When infinity is
removed (udachati) from infinity, it's the infinity that only remains.
Atharva Veda 10.8.29
Some people incorrectly renders this Mantra as meaning " (Infinity) minus (Infinity) is Infinity" to apparently show the limitation of ancient seers.