GNI - It includes all income earned by a country's residents, both domestically and abroad. This includes wages, profits, interest, and other forms of income earned by citizens and businesses, regardless of whether it's earned within the country's borders or outside of them. So, if a company owned by residents of one country generates profits from a subsidiary located in another country, those profits are included in the GNI of the country of residence.
GNP - It measures the total value of all goods and services produced by a country’s residents,both domestically and abroad.It includes the income earned by residents within the country and income earned by them from overseas investments.
To illustrate the difference between the two, consider a scenario wherein; Gross National Income (GNI): GNI includes the domestic production ($10 billion) and the net income earned from abroad. Therefore, GNI for Prospera would be $10 billion (domestic production) + $2 billion (remittances from citizens abroad) - $1 billion (income sent abroad by foreign citizens) = $11 billion.