Solve the following problem using propositional logic and explain the steps:
Person X finds two trunks, A and B, in a cave. He knows that each of them either contains a treasure or a fatal trap.
- On trunk A is written: "At least one of these two trunks contains a treasure."
- On trunk B is written: "In A, there's a fatal trap."
X knows that either both the inscriptions are true, or they are both false. Can X choose a trunk, being sure that he will find a treasure? If this is the case, which trunk should he open?