Its actually up to you. Before you pay for Meltdown you declare the value of X. So you announce I am casting Meltdown with X = 2. Now you derive the cost.

= 2 =

+

=

Trinisphere says "ok, I got no beef with you"
Or you could say I annouce I am casting Meltdown with X = 0. Now

= 0 =

+

=

now Trinisphere says "Hey you didn't pay 3, so I will increase the cost you pay to

" this does not change the value of X.