Solution:
a. Suppose that CD is the minor base of the trapezoid, that X is on AD and Y on BC, as in the figure. Since the lines AB, XY, DC are parallel, by Thales' theorem we have the proportion DX:XA=CY:YB, and hence DX:(DX+XA)=CY:(CY+YB), that is DX:DA=CY:CB.
Note now that the triangles ABD and XPD are similar, since XP is parallel to AB (hence ∠DXP=∠DAB and ∠DPX=∠DBA); from this follows the proportion between corresponding sides XP:AB=DX:DA.
In exactly the same way, the triangle ABC is similar to the triangle PYC (PY is parallel to AB, the corresponding angles that are formed are congruent), and the proportion PY:AB=CY:CB holds.
Combining the proportions written so far, XP:AB=DX:DA=CY:CB=PY:AB, hence XP=PY, as was to be shown.

b. Let M be the point of intersection between QP and the minor base. By the parallelism between DC and XY we have, in the manner of the previous proof, the similarity between the triangle QDM and the triangle QXP, as well as between the triangle QMC and the triangle QPY. From this we derive the proportions DM:MQ=XP:PQ and CM:MQ=YP:PQ; since, by part (a), XP=YP, we obtain DM:MQ=CM:MQ, and hence finally DM=CM (M is the midpoint of DC).
Note that the claims of the problem (both that of part (a) and that of part (b)) are invariant under affine transformations of the plane: indeed, affinities preserve the ratios between the lengths of segments on the same line, and therefore it suffices to show the claims on an affine image of the initial construction.
Every trapezoid ABCD can be transformed by an affinity into an isosceles trapezoid; take for example the affinity that fixes A and B and sends Q to a point (different from the midpoint of AB) on the perpendicular bisector of AB. The triangle ABQ is sent to an isosceles triangle, the trapezoid to an isosceles trapezoid; since affinities send lines to lines and preserve parallelism, the construction of the problem remains the same. We have thus reduced ourselves to showing that XP=PY and that QP meets the minor base at its midpoint in the case where ABCD is isosceles. In this case, however, the claims are evident by symmetry: P lies on the perpendicular bisector of AB, CD and XY, which passes through Q.