How do you calculate the nominal GDP and the real GDP of something?

I know the formula for GDP is y=c+I+G+NX
but in a problem like an economy produced this many of good#1 and this many of good#2 last year. The price of each good #1 was $8 last year, and each good#2 cost $7 last year. In the base year, each good#1 cost $3 and each good#2 cost $4.
What is the nominal GDP and the real GDP for last year?

how do I go and solve this?

To calculate the nominal GDP and the real GDP, you will need to follow a few steps:

Step 1: Determine the quantities produced.
In this case, you are given the quantities of two goods produced last year. Let's say the quantity of good #1 is Q1 and the quantity of good #2 is Q2.

Step 2: Determine the prices of the goods.
You are given the prices of the goods for both last year and the base year. Let's call the price of good #1 last year P1_last, the price of good #2 last year P2_last, the price of good #1 in the base year P1_base, and the price of good #2 in the base year P2_base.

Step 3: Calculate the nominal GDP.
The nominal GDP is calculated by multiplying the quantities produced by their respective prices in the current year and summing those values. Based on the formula you provided (GDP = C + I + G + NX), you need to identify which category each good falls into. Typically, good #1 would be classified as consumption (C), and good #2 would be classified as investment (I). However, without additional information on the nature of the goods, it's difficult to provide a definitive categorization.

If, for example, good #1 is categorized as consumption, and good #2 is categorized as investment, you can calculate the nominal GDP as follows:
Nominal GDP = (Q1 x P1_last) + (Q2 x P2_last)

Step 4: Calculate the real GDP.
The real GDP is calculated by multiplying the quantities produced by their respective prices in the base year and summing those values. Using the same categorization assumption from step 3:
Real GDP = (Q1 x P1_base) + (Q2 x P2_base)

In this specific case, you would substitute the given values into the equations and calculate the nominal GDP and the real GDP.