After the drawbridge drama, Trico lays down and won't move until he gets some food. This area is a little frustrating because all of the climbable terrain and the hanging chain make it seem like there should be something there, but there's just not.
There's a cart propping open a gate in front of Trico. Walk on either side of the cart to get into the tunnel. Follow the tracks back to the hole in the floor that the tracks span.
Drop down to the area below the tracks and turn left. There's a crack in the wall that you can walk through to get to a very, very dark area beyond. There's not much going on in here, so it's OK that you can't see. Look for the Trico Treat — helpfully surrounded by blue butterflies — and go pick it up.
Carry the Trico Treat back to the area under the tracks. You can't climb or jump while carrying a barrel, so you're going to have to throw the barrel onto higher platforms to get it out. This is way harder than it sounds because the barrels are quite heavy and follow laws of physics known only to them (that are quite possibly non-Euclidean). Just be patient and keep trying.
Jump to where the barrels land as quickly as you can because the barrels bounce in unexpected ways and seem to desperately want to roll back to where they came from. If the barrel gets away from you, just remember that it is possible to pull this off and that Trico's adorableness makes it worth it.
Start with your back to the crack in the wall. In the far corner on the left, the rubble will let you climb up to a platform. Turn to your right and look across the pit for another platform with some blue tiles on it. Toss the barrel across to this platform. Carry it from here onto the ledge and around to your left. Throw it across the pit again onto the ledge under the track. Toss it one more time onto the platform to the left of the leftmost track.
The last throw will have to be toward the back of the tunnel. Pick up the barrel and teeter-totter it along the rail, then take it out side to Trico.
Your next goal it to get Trico into the tunnel. Go back inside and pull on the mine cart — it turns out there are two here and only one is jammed under the door. Pull and/or push the minecart until it stops on the rubble. Climb onto the minecart and jump to the left onto a ledge. Pull on the chain to open the main door. Trico will shove the other cart out of the way and join you inside.
Across the pit where you channeled your inner Donkey Kong, there's a passage on the left. It's very dark in here, and there are cracks in the floor that you can fall through (that lead you back to the pit), but luckily Trico's eyes and horns act like headlights. Your goal is to get Trico to carry you all the way to the back of this passage — it's vaguely right of where you start. There are a lot of twists and turns and it's a tight squeeze for Trico.
If you have more luck commanding Trico than we did, you can ride him all the way. More likely, you'll have to do a combination of commands, cajoling and leading to get him all the way to the end. Any time he stops and doesn't seem like he understands the concept of "forward," hop off of his back and walk ahead of him a little ways. He'll try to follow you.
At the very end of the passage, climb on Trico's back and let him carry you up and out.