Find the CPI for each year(2005 is he base year;and take 2005 as the fixed basket of goods for each year):

2005 price of apple is $1 for 100 quantity produced. Banana $2 for 50 quantity produced.

2006 price of apple is $2 for 150 quantity produced. Banana $3 for quantity of 100.

First calculate the "weight" of each good -- that is the percentage of total expenditures spent on that good. In 2005, $100 are spent on apples, $100 on bananas, for a total of $200. The weight of apples is 0.50

In 2006, price of apples went up by 100%, price of bananas went up by 50%
Take the weighted average .5*100% + .5%50% = 75%
CPI in 2005 = 100, CPI in 2006 = 175.

To find the Consumer Price Index (CPI) for each year, we need to calculate the cost of the fixed basket of goods relative to the base year (2005).

Step 1: Calculate the cost of the fixed basket of goods in each year using the prices and quantities given.

For 2005:
Price of apples = $1 for 100 quantity produced
Price of bananas = $2 for 50 quantity produced

Cost of the fixed basket in 2005:
(100 apples x $1) + (50 bananas x $2) = $100 + $100 = $200

For 2006:
Price of apples = $2 for 150 quantity produced
Price of bananas = $3 for 100 quantity produced

Cost of the fixed basket in 2006:
(150 apples x $2) + (100 bananas x $3) = $300 + $300 = $600

Step 2: Calculate the CPI for each year using the cost of the fixed basket relative to the base year.

CPI for 2005 = (Cost of fixed basket in 2005 / Cost of fixed basket in 2005) x 100
CPI for 2005 = ($200 / $200) x 100
CPI for 2005 = 100

CPI for 2006 = (Cost of fixed basket in 2006 / Cost of fixed basket in 2005) x 100
CPI for 2006 = ($600 / $200) x 100
CPI for 2006 = 300

So, the CPI for 2005 is 100, and the CPI for 2006 is 300.