Stolen Rubies

A corrupt merchant has been caught after stealing from your village for years. He used his stolen wealth to illegally purchase 30 rubies, which the leader of the village has tasked you with retrieving. You will be able to recover some of the rubies following a very peculiar trial. The merchant will hide all 30 rubies spread between three treasure chests. Your job is to guess how many rubies are in each chest. If your guess is more than the number of rubies in a particular chest, you get 0 rubies. Otherwise, you get a number of rubies equal to your guess.


Additionally, there are a few rules for how the merchant can place the rubies into the chests.

1st - Each box must contain at least 2 rubies.

2nd - One box must contain exactly 6 more rubies than another box.

What should you guess in order to recover the maximum number of rubies?