So the independent variable is the thing that is changed so that would be the number of pizza toppings.
The dependant variable is the thing you measure so the cost of the pizza
These are related as as you add another pizza topping, the cost of the pizza rises by 2. Hope this helps :)