On Sierpinski's example of a set intersects every horizontal or vertical line in exactly one point The following is an exercise from Bruckner's Real Analysis:

Using the continuum hypothesis, one can prove that there exists
a Lebesgue non-measurable subset $E$ of $\mathbb{R^2}$ such that $E$ intersects every horizontal or vertical line in exactly one point. (a) Use this set to show that there exists a function $f : \mathbb{R^2} \to \mathbb{R}$ such that $f$ is Borel measurable in each variable separately, yet f is not Lebesgue measurable. (b) Show that the restriction of $f$ to any horizontal or vertical line has only one point of discontinuity.

The first sentence of the exercise is explained in here, even though not an explicit construction of the set is shown. Still couldn't solve the exercise with reading the mentioned OP and the answers there. Please help, thanks!

Given $E \subseteq \Bbb R^2$ consider $f: \Bbb R^2 \to \Bbb R$ given by $f(x,y)=1$ if $(x,y) \in E$ and $0$ otherwise. $f$ is not measurable as $E$ is not.
But if we fix the first coordinate to $x_0 \in \Bbb R^2$, the one-variable functon $f(x_0, \cdot)$ assumes the value $1$ only once, so that function is almost $0$ and thus measurable, quite trivially. The same for $f(\cdot, y_0)$ for any fixed $y_0 \in \Bbb R$. So that takes care of $a)$ and $b)$ both.
