In the coding table: CLOUD=durxs, MOON=wxxv, SKY=tbh, STAR=pcba, SUN=bwd. Code letter of 'O' is -
In the coding table: CLOUD=durxs, MOON=wxxv, SKY=tbh, STAR=pcba, SUN=bwd. Code letter of 'O' is -
In MOON=wxxv, the repeated letter O corresponds to the repeated code letter x, and this is confirmed since x also appears in CLOUD's code set (which contains O). So O maps to x.
Re-check your working by substituting the answer back into the original question.