prove that the intersection of the two lines $l_1$ and $l_2$ is concyclic with midpoints of three sides of a triangle 
Let $ABC$ be a triangle. Suppose the lines $l_1$ and $l_2$ are perpendicular, and meet each side (or its extension) in a pair of points symmetric across the midpoint of the side. Then the intersection of $l_1$ and $l_2$ is concyclic with the midpoints of the three sides.

Let $M_A, M_B,M_C$ be the midpoints of the sides $BC,CA,AB$ and let $P= l_1\cap l_2$.
I'm not really sure how to visualize this geometrically, so could someone draw a good picture to represent the situation? I think that could clear up a lot of confusion I've been having. In a solution I found online, it said the lines $l_1, l_2, BC$ should form a right triangle where $M_B$ is the midpoint of the hypotenuse and the triangle formed by the points $P, M_B, l_2\cap BC$ is isoceles with $\angle (M_BP, l_2) = \angle (l_2, BC)$. Similarly, $\angle (l_2, M_AP) = \angle (CA,l_2)$. Then one could add these inequalities to show $\angle M_B P M_A  + \angle M_BM_CM_A = 180$ so that the quadrilateral $M_B PM_AM_C$ is cyclic.

But again, I'm not sure whether these claims hold.

 A: 
A good diagram surely helps. First draw $\ell_1$ cutting sides $AB,BC,CA$ of $\triangle ABC$ in $X,Y,Z$ respectively. Now take points $X',Y'$ on $AB,BC$ respectively so that $XM_C=X'M_C$ and $YM_A=Y'M_A$. Then the condition that $\ell_1,\ell_2$ meet the sides symmetrically across midpoints mean, $\ell_2$ pass through $X',Y'$.
It should be considered an exercise, preliminary to current question, to show that intersection of $\ell_2$ with $AC$, $Z'$, lies symmetrically to $Z$, that is, $ZM_B=Z'M_B$.
For such a configuration, the angle between $\ell_1,\ell_2$ could vary; here it is given that $\angle(\ell_1,\ell_2)=90^\circ$. For this constraint, one has to show that their intersection point $P$ lies on the circle through the three midpoints.
It is clear that $\angle M_AM_CM_B = \angle C$. For right $\triangle ZPZ'$, $M_B$ is circumcenter and $PM_B=Z'M_B$. So $\angle M_BPZ'= \angle M_BZ'P$. Similarly $PM_AY'$ is isosceles and $\angle M_APY' = \angle M_AY'P=\angle CY'Z'$.
In $\triangle Y'CZ'$, we see the exterior angle $$\angle C = \angle CY'Z' + \angle CZ'Y' =\angle M_APY' + \angle M_BPZ' = \angle M_APM_B $$
Thus $\angle M_APM_B = \angle M_AM_CM_B$ and it follows that $P$ lies on the said circle.
A: There is an alternative approach to this result which is perhaps rather routine, but provides more information, in particular, that  the  implication is actually an equivalence in general.  It uses the so-called $p,q$ method. We can assume that $A=(0,0)$, $B=(1,0)$ and $C=(p,q)$, $X=(1-s)C+sA$,  $X´=sC+(1-s)A$,  $Y=(1-t)A+tB$,
$Y´=tA+(1-t)$.   It is then elementary, but tedious, to compute all the relevant points in terms of $p$, $q$, $s$ and $t$.  The two geometric conditions, perpendicularity and cocyclicity are then expressed as algebraic equations in these variables.  This gives their equivalence  except in the special situations $s=1$, $t=1$, $s+t=1$ and $1-s-t+2 s t=0$ which are dealt with separately.
