This is an isosceles triangle, so the triangle formed by PQM is a right-angled triangle with PQ = 34, PM = 16, so QM = √(342 - 162)
$${\mathtt{QM}} = {\sqrt{{{\mathtt{34}}}^{{\mathtt{2}}}{\mathtt{\,-\,}}{{\mathtt{16}}}^{{\mathtt{2}}}}} \Rightarrow {\mathtt{QM}} = {\mathtt{30}}$$
.
Edited: corrected to get signs right!