You are hunting for the lost treasure of the Weller brothers, hidden in a pirate cave somewhere - when you finally find the treasure however, it's locked behind a door at the back of a room in the cave. Interestingly, there is a library aboveground nearby with 6 lecterns in it, each displaying a copy of the exact same book.
The book merely contains a version of "The Wellerman" song lyrics but split across multiple pages.
Each book has a different cover, however.
Book 1 features a red star on a white background.
Book 2 features a green crescent on a white background.
Book 3 features a red jolly-roger on a black background.
Book 4 features a blue wave on a white background.
Book 5 features green stripes on a black background.
Book 6 features a blue X on a black background.
As you read the pages, you note the following lyrics: https://genius.com/Nathan-evans-wellerman-sea-shanty-lyrics
Page 1: verse 1.
Page 2: chorus
Page 3: verse 2
Page 4: chorus
Page 5: verse 3
Page 6: chorus
Page 7: verse 4
Page 8: chorus
Page 9: verse 5
Page 10: chorus
Page 11: verse 6
Page 12: chorus
Page 13: chorus repeated again
Meanwhile, the cave has two tables painted on the walls:
Finally, there is also an ominous warning written in pirate dialect saying that only he who turns his pages rightly will inherit the treasure.
You must figure out which books need to be turned to which pages. Once the pages are turned correctly, the door will open due to some kind of magic or complicated mechanism that isn't worth explaining.