Question:

I have a question concerning Belshazzar and the Babylonian kingdom. Daniel
was offered to be the third ruler of the kingdom if he could tell the
interpretation of the writing on the wall. The question was asked, Was there
two rulers in the kingdom at that time or was there only one king?

Answer:

"Then Belshazzar gave the command, and they clothed Daniel with purple and put a chain of gold around his neck, and made a proclamation concerning him that he should be the third ruler in the kingdom" (Daniel 5:29).

In most kingdoms there would be the current king, the heir apparent, and then the chief counselor. After Nebuchadnezzar died in 562 B.C., Babylon had a series of short-lived kings. Nebuchadnezzar's son, Evil-Merodach, succeeded his father, but was assassinated two years later. His brother-in-law, Neriglissar, came to the throne, but he died four years later. His infant son, Labashi-Marduk, was next in line, but was assassinated. He was followed by the last king of Babylon, Nabonidus.

Babylonian kings were required attend a yearly new year ceremony and pledge their loyalty to the Babylonian god, Marduk. Nabonidus, however, chose to give loyalty to another god, the moon god Sin. This caused such an uproar in Babylon that Nabonidus left the city and put his son, the crown prince Belshazzar, in charge.

This explains the third in line offer. Belshazzar was second after his father, Nabonidus, and offered to put Daniel directly under himself.

A good reference source for this and other historical matters is A Remnant Shall Return, by Bob and Sandra Waldron.