As far as I understand it:
(T,F) represents the amount of water in the Three and Five liter jugs respectively
So (1,2) means there is 1l in the 3l jug and 2l in the 5l jug.
f3 : if T < 3 then (3,F)
Filling up the 3l jug will mean T=3 and F=F (unchanged)
f5 : if F < 5 then (T,5)
Filling up the 5l jug will mean F=5 and T=T (unchanged)
e3 : if T > 0 then (0,F)
e5 : if F > 0 then (T,0)
Emptying either jug will mean T or F = 0 leaving the other unchanged.
p3,5: if (5-F)<=T then (T-(5-F),5) else (0,T+F)
p5,3: if (3-T)<=F then (3,F-(3-T)) else (T+F,0)
This is where I think it gets a bit confusing, this is taking into account an "overflow" so if T=3 and F=3, T can only pour 2l into F leaving 1l in T, else T will be emptied and F will just have it's amount increased by T.
It's similar for pouring from F to T.