The trick here is that both equations contain P(D∣H) which is the hardest to calculate, and that number drops out when we divide the equations.
You have a couple typos here. The first centered equation should not have a $P(\bar H H | X)$ but instead have $P(\bar H | X)$, and the inline expression should be $P(D | X)$, not $P(D | H)$.
You have a couple typos here. The first centered equation should not have a $P(\bar H H | X)$ but instead have $P(\bar H | X)$, and the inline expression should be $P(D | X)$, not $P(D | H)$.
Also, the second $P(intact∣orc,X)$ should be $P(intact∣goblin,X)$