Legacy of the Ancients is one of the puzzles that become solvable in later parts of Pathfinder: Wrath of the Righteous and here is all the info you need to complete it.
Pathfinder: Wrath of the Righteous will not let you complete the Legacy of the Ancients puzzle until Act 5, even though you almost get all the necessary locations in Act 3.
In order to get the slabs for the puzzle, you will need to reach Place of Execution, which is located to the west of Blackwater. To get there, you can either go through Pulura's Fall which is south of Blackwater or just go around it by taking the northern route. In both scenarios, just go west until you reach it.
You can see Pulura's Fall in the bottom right of the image and Place of Execution to the left.
Once you've cleared the location and picked up the slabs, you can go to Legacy of the ancients and line up the slabs in the order shown in the picture below. Line your in-game compass up so the arrow points to the north in order to get the camera angle from the picture.
When you complete the puzzle, a door with reward chests will open so don't forget to loot them. They contain a rather nice item called Grasp of Devotion, make sure you don't miss it.