Here is a formula that works for your example table.
If( Row() == 1,
startTeam = :Team;
theList = {};
theDelta = .;
);
If( :Team == startTeam,
Insert Into( theList, :value ),
If( :Team != Lag( :Team ),
count = 0
);
count++;
theDelta = theList[count] - :value;
);
theDelta;
Jim