Hint $\ $ Compute $\rm\: x^4 = (x^2)^2\! = \color{#C00}a+\color{#0A0}b\sqrt{d}\ $ so $\rm\:\bar x^4 = a-b\sqrt{d}.\ $ Let $\rm\,n = x\bar x.\:$ Therefore
$$\rm x^4 + \frac{1}{x^4}\, =\, x^4 + \frac{\bar x^4}{(x\bar x)^4}\, =\, x^4 + \frac{\bar x^4}{n^4 }\, =\, (\color{#C00}a(n^4\!+1) +\, \color{#0A0}b(n^4\!-1)\sqrt{d})/n^4$$
Here $\rm\: x^4 = (x^2)^2\! = (31+12\sqrt{3})^2\! = 1393+744\sqrt{3}\ $ so $\rm\:\color{#C00}a=1393,\ \color{#0A0}b = 744,\: $ and $\rm\,n = x\bar x = -23.$
Remark $\ $ As I mentioned in the closely related question, one can also employ (Newton) identities for symmetric functions (see also Babak's answer). However, in this example, that method, done rotely, will require doing more (large) integer arithmetic, and it will result in a less concise answer, since it does not preserve the $\rm\:n^4\!\pm 1\:$ structure in the result.