The Binomial Theorem expands a sum of two quantities, so we group the three terms into two. Take $$A = 1 + \dfrac{x}{2}$$ and $$B = \dfrac{2}{x}$$, so the expression is $$(A - B)^4$$.
Expanding $$(A-B)^4$$ with coefficients $$1, 4, 6, 4, 1$$:
$$(A-B)^4 = A^4 - 4A^3B + 6A^2B^2 - 4AB^3 + B^4$$
Since $$B = \dfrac{2}{x}$$, we have $$B^2 = \dfrac{4}{x^2}$$, $$B^3 = \dfrac{8}{x^3}$$, $$B^4 = \dfrac{16}{x^4}$$, so
$$(A-B)^4 = A^4 - \dfrac{8A^3}{x} + \dfrac{24A^2}{x^2} - \dfrac{32A}{x^3} + \dfrac{16}{x^4}$$
Now expand the powers of $$A = 1 + \dfrac{x}{2}$$ by the Binomial Theorem:
$$A^2 = 1 + x + \dfrac{x^2}{4}$$
$$A^3 = 1 + \dfrac{3x}{2} + \dfrac{3x^2}{4} + \dfrac{x^3}{8}$$
$$A^4 = 1 + 2x + \dfrac{3x^2}{2} + \dfrac{x^3}{2} + \dfrac{x^4}{16}$$
Substitute these into the five terms one at a time:
$$A^4 = 1 + 2x + \dfrac{3x^2}{2} + \dfrac{x^3}{2} + \dfrac{x^4}{16}$$
$$-\dfrac{8A^3}{x} = -\dfrac{8}{x}\left(1 + \dfrac{3x}{2} + \dfrac{3x^2}{4} + \dfrac{x^3}{8}\right) = -\dfrac{8}{x} - 12 - 6x - x^2$$
$$\dfrac{24A^2}{x^2} = \dfrac{24}{x^2}\left(1 + x + \dfrac{x^2}{4}\right) = \dfrac{24}{x^2} + \dfrac{24}{x} + 6$$
$$-\dfrac{32A}{x^3} = -\dfrac{32}{x^3}\left(1 + \dfrac{x}{2}\right) = -\dfrac{32}{x^3} - \dfrac{16}{x^2}$$
$$B^4 = \dfrac{16}{x^4}$$
Finally collect like terms (constant: $$1 - 12 + 6 = -5$$; coefficient of $$x$$: $$2 - 6 = -4$$; coefficient of $$x^2$$: $$\tfrac{3}{2} - 1 = \tfrac{1}{2}$$; coefficient of $$\tfrac{1}{x}$$: $$-8 + 24 = 16$$; coefficient of $$\tfrac{1}{x^2}$$: $$24 - 16 = 8$$):
$$\left(1 + \dfrac{x}{2} - \dfrac{2}{x}\right)^4 = \dfrac{x^4}{16} + \dfrac{x^3}{2} + \dfrac{x^2}{2} - 4x - 5 + \dfrac{16}{x} + \dfrac{8}{x^2} - \dfrac{32}{x^3} + \dfrac{16}{x^4}$$