Continuous image of a Polish space to another has the Baire property Here's a theorem in the course notes of a course on Polish groups:

Let $X$ and $Y$ be Polish spaces and $f:X\to Y$ continuous.
$f(X)$ has the Baire property.

In the course note, it's written that this follows from the existence of $U(A)$ (which I define bellow). The proof should be easy otherwise I would have written it. Unfortunately, while reviewing the notes, I forgot the proof and I'm unable to prove the theorem above.
Here's the definition of $U(A)$:

Let $X$ be a Polish space and $A\subseteq X$.
$$U(A):=\bigcup\{O\mid A\text{ is comeager in $O$, i.e, $O\backslash A$ is meager}\}.$$

We have the following facts:


*

*$U(A)$ is open.


*$A$ is comeager in $U(A)$.


*$A$ has the Baire property $\iff$ $A\backslash U(A)$ is meager.

Attempt
So I tried to show that $f(X)\backslash U(f(X))$ is meager.
If $f(X)$ is meager, we're done. Otherwise $U(f(X))\neq\emptyset$ and $U(f(X))\backslash f(X)$ is meager. I coudln't find a way to use the continuity of $f$ to conclude. I also tried to prove the theorem by contradiction using $$f(X)\backslash U(f(X))=\bigcap\{f(X)\backslash O\mid f(X)\text{ is comeager in $O$}\}$$
but I couldn't get to the result. Could you please help me?


Let $X$ and $Y$ be Polish spaces and $f:X\to Y$ continuous.
  $f(X)$ has the Baire property.

This is Nikodym’s or Luzin-Sierpiński’s theorem stating that analytic sets have Baire property. Its proofs which I found  are not very easy but are based on previous lemmas like closedness of a class of sets with Baire property under Souslin operation. See, for instance, Proposition 3.26 in “Lecture notes on descriptive set theory” by Philipp Schlicht, Lecture on Regularity Properties of Analytic Sets or Corollary 14.5 in “Introduction to descriptive set theory” by Anush Tserunyan. See also Theorem 11.18.ii here and Theorem 2.2 in “Analytic Baire spaces” by A. J. Ostaszewski.
