Let x be the first jug, y the second jug.
From first statement, subtracting 1 from x, makes them equal:
x - 1 = y
From second statement, subtracting 2 from y, makes it half of x:
x/2 = y-2
Solve system with substitution:
x/2 = (x-1) -2
x/2 = x - 3
x- x/2 = 3
x/2 = 3
x = 6
y = x-1 = 6-1 = 5
Therefore the largest jug contains 6 liters.