The Trial of the Serpent is one of the most complex riddles in the Shadow of the Tomb Raider and it's solved in the location called the Head of the Serpent. You can reach it from the Hidden City, but keep in mind that you have to complete a certain portion of the main plot beforehand, as well as complete the location called Belly of the Serpent. As regards the riddle itself, Lara has to figure out a way of setting two big barricades on fire.
Setting the first barricade on fire
The riddle starts soon after entering the location called the Head of the Serpent, namely after sliding down the rope to the big hall with a barricade - as shown above.
Start by finding the lever with a rope coil left of the barricade (picture above). Aim at it with the bow and fire a rope arrow. Lara will be able to pull the lever and spill the flammable substance, which will accumulate in a container right before the barricade.
Now approach the central device from picture 1. Interacting with it will spread fire over the barricade. It will soon burn, revealing the way further on (picture 2).
Setting fire on the second barricade
On your way to the second barricade, Lara has to climb up a wall again and slide down the rope. The spot where the second part of the riddle takes place is shown above.
Get near the barricade and examine the two columns. Stand next to the lower one and aim the arrow at the rope coil and the taller column (picture 1). You want to connect both columns with a rope (picture 2).
Approach the lever next to the taller pole and push it. You want to bring set the grooves around the shorter pole are in the right configuration - refer to the picture above.
Another step will Focus on shifting the grooves at the taller column. This means that you have to disconnect the two columns. Use the knife to cut the rope.
Go back to the lever and set the grooves in a way that will allow the flammable substance to pour through. Refer to the picture above.
Now go back to the upper part of the hall and find a new lever with a rope coil (picture above). Shoot it with a rope arrow. Pull the lever to pour the flammable substance. If the grooves have been set the right way, the container next to the second barricade shall be filled.
The last step is obvious - interact with the mechanism on picture 1 to set the substance alit. The barricade will be destroyed (picture 2) and you'll be able to proceed further, at the same time completing the challenge (in the last chamber, a cut-scene will automatically commence).