So how can I find the value of b? Trial and error method for example? Is b an integer?
It clearly stated that
b is chosen by the attacker. Your questions indicate to me that it might help to learn more about cryptography before tackling the details of this subject.