The probability that only X solves the problem means X successfully solves it and Y fails to solve it.
Given:
Probability that X solves the problem =31
Probability that Y solves the problem =41
The probability that Y does not solve the problem:
P(Y does not solve)=1−41
P(Y does not solve)=43
For only X to solve the problem, both events must occur: X solves AND Y does not solve.
Since these are independent events:
P(Only X solves)=P(X solves)×P(Y does not solve)
P(Only X solves)=31×43
P(Only X solves)=123
P(Only X solves)=41
Therefore, the probability that only X solves the problem is 41.