1. He worked hard to be a best baseball player.

2. He worked hard to be the best baseball player.

(which one is right? Do we have to use 'a' or 'the'? Do they have a different meaning?)

#2 is correct. Don't use #1.

Both sentences are grammatically correct, but they have slightly different meanings.

1. "He worked hard to be a best baseball player."

In this sentence, "a" is used before "best" to indicate that he aspires to be one of the many best baseball players. It suggests that he wants to achieve a high level of skill, but not necessarily the highest. This sentence implies that there are several best baseball players, and he wants to be one of them.

2. "He worked hard to be the best baseball player."

In this sentence, "the" is used before "best" to indicate that he aims to be the absolute top or the number one baseball player. It suggests that he wants to be better than all others, without competition. This sentence implies that there can only be one truly best baseball player, and he wants to claim that title.

So, the choice between "a" and "the" depends on the nuance and level of ambition implied by the speaker or writer.