Solution:
Let Y be the projection of X onto AB. We prove that the circles circumscribed to triangles AMC and AXH both pass through Y. This is equivalent to proving that BY⋅BA=BM⋅BC, and this in turn is true since both products equal BX⋅BH, since the quadrilaterals AYXH and HXMC are cyclic, both having by construction a pair of opposite right angles.
At this point the thesis has become that the points Y,Q,C are collinear if and only if BQ and CQ are perpendicular.
Let us now denote by θ the measure of angle BAM. From the cyclicity of AYMC we know that ∠YCB=θ. Moreover ∠QBC=90∘−θ, since in the isosceles triangle BQM the angle at the vertex Q has measure 2θ (here we are using that Q is the circumcenter of ABM and central angles are twice the inscribed angles). It follows that Y,Q,C are collinear if and only if ∠BCQ=∠BCY=θ, that is, if and only if ∠BCQ+∠QBC=90∘, that is, if and only if BQ and CQ are perpendicular.

Remark A posteriori, in the configuration in which BQ and CQ are perpendicular, the triangle BQM turns out to be equilateral. It follows that ∠BQM=60∘, and hence θ=30∘.