Trolls on the Bridge
The cow has to go from T1 to E2. It will be changed to a goat at E2. It has to go that route, since if it began at E1, the cow would be changed into a goat. When it then went on to T1 or T2, it would be eaten.
The goat has to go from E1 to E2. It will be transformed into a cow at E1, and it will be a goat when it arrives at the pasture.
Any other route would result in the goat being eaten. If it began at T1, it would be eaten straight away. If it began at E1 to T1 to E2, it would be transformed from a cow into a goat.
The bear cannot escape transformation into a cow, since it will pass either through E1 or E2. The shortest route for the bear is E1 to T2.
The cow will arrive at the pasture as a goat. The goat will arrive at the pasture as a goat. The bear will arrive at the pasture as a cow. So there will be two goats and one cow in the pasture.