You use each year's ending inventory costs to create it's layer – UNLESS the inventory went DOWN (in base year $) in which case you don't have a layer for that year, you sold inventory from the prior year. This one is a little confusing because your FIRST year has a lower inventory, so your base year has to be reduced.
Base Yr Curr Yr____$Val Lifo
01/01/x0___90,000____90,000____90,000
X0 layer__does not exist, must reduce Base layer (you sold all of X0 inventory and some of prior years')
12/31/X0___20,000______________20,000
X1 layer___20,000__x2.0>>>_____40,000 Base yr x X1 index = X1 layer
12/31/X1__40,000____80,000_____60,000 80/40=2; X0 end(20K)-X1 end(40K) = 20K; X0 (reduced base) layer + X1 layer = X1 end at $Value LIFO
There's a really good example here, someone else posted it a few pages back: https://www.accountingformanagement.org/dollar-value-lifo-method/