$\begin{array}{l}M = \left(\dfrac{3\sqrt{3x^3}+1}{x\sqrt{3} + \sqrt{x}}+\sqrt{3}\right):\left(\dfrac{3x+1}{x+4}\right)\\ a)\,\,ĐKXĐ: \, x > 0\\ M = \left(\dfrac{\sqrt{(3x)^3}+1}{\sqrt{x}(\sqrt{3x} + 1)}+\sqrt{3}\right).\left(\dfrac{x+4}{3x+1}\right)\\ = \left(\dfrac{(\sqrt{3x}+1)(3x - \sqrt{3x} + 1)}{\sqrt{x}(\sqrt{3x} + 1)}+\sqrt{3}\right).\left(\dfrac{x+4}{3x+1}\right)\\ = \left(\dfrac{3x - \sqrt{3x} + 1}{\sqrt{x}}+\dfrac{\sqrt{3x}}{\sqrt{x}}\right).\left(\dfrac{x+4}{3x+1}\right)\\ = \left(\dfrac{3x + 1}{\sqrt{x}}\right).\left(\dfrac{x+4}{3x+1}\right)\\ =\dfrac{x+4}{\sqrt{x}}=\dfrac{\sqrt{x}(x+4)}{x}\\\\ b)\,\,M - 4 = \dfrac{\sqrt{x}(x+4)}{x} - 4\\ =\dfrac{\sqrt{x}(x+4) - 4x}{x}\\ = \dfrac{\sqrt{x}(x - 4\sqrt{x} + 4)}{x}\\ = \dfrac{\sqrt{x}(\sqrt{x} - 2)^2}{x}\\ Do \,\,\begin{cases}(\sqrt{x} - 2)^2 \geq 0, \forall x\\x > 0\end{cases}\\ nên \,\, M - 4 = \dfrac{\sqrt{x}(\sqrt{x} - 2)^2}{x} \geq 0, \forall x > 0\\ Vậy\,\, M \geq 4\\\\ \star \,\,M = 4 \Leftrightarrow \sqrt{x}(\sqrt{x} - 2)^2 = 0\\ Do\,\,x >0 \Rightarrow \sqrt{x} >0\\ nên \,\,\sqrt{x}(\sqrt{x} - 2)^2 = 0 \Leftrightarrow \sqrt{x} - 2 = 0\\ \Leftrightarrow \sqrt{x} = 2 \Leftrightarrow x = 4\\ Vậy\,\,x = 4 \end{array}$