Deathless that are operating the third trebuchet destroy the machine that you have just been using. To get to them, pull the rope between the objects shown in the screenshot and slide down.
Shoot rope arrow towards any end of the horizontal beam, pull the rope and the beam will change its position. Run over it towards the tower with the third trebuchet.
Climb up the tower and jump towards the object hanging on chains which, after it turns allows you to go higher.
If you have not done this already, kill out the Deathless and make it over to the tower behind the trebuchet. Atop the tower, there is a small wooden container. Use rope arrow to tie it to the balance beam right next to you.
Shoot the arrow at the tip of the balance beam. Lara will turn the balance beam by pulling the rope, thanks to which the wooden bucket slides down from the tower.
Now, walk over into the position, where you can see the bucket well. Note that at the side of the bucket, there is a plank that is wound in rope, that performs the role of a valve. Shoot at it to make it change positions (the above screenshot). This way you will lock the valve and the bucket can now hold water from the waterfall.
Change positions and shoot at the arm of the balance beam thanks to which you change its position and get the bucket under the water to fill with water.
Again, walk over to the other side of the connected towers and shoot at the valve of the bucket, to make the arm of the balance beam get into the horizontal position. This should take two seconds, at most, so after some of the water is released, you need to shoot the valve again, to lock it.
Now, jump onto the base of the balance beam and jump down onto the metal container. This way, you will release the huge gear in the trebuchet, which previously made it impossible to turn it.