Let $\omega$ be a $1$-form in $U \subset \mathbb{R}^2$. A local integrating factor in $p$ for $\omega$ is a function $g: V \rightarrow \mathbb{R}$ defined in a neighbourhood $V$ of $p$ such that $g\omega$ is exact in $V$, i.e., there exists $f: V \rightarrow \mathbb{R}$ such that $g \omega=df$
Show that, if $\omega(p) \neq 0$, there exists a local integrating factor in $p$ for $\omega$.
I tried solving this exercise, but got into a PDE which I don't know how to solve... got stuck then.
A more general result can be found in Conditions on a $1$-form in $\mathbb{R}^3$ for there to exist a function such that the form is closed. For your special case (1-form in $\mathbb{R}^2$) a direct argument can be given as follows. (I am going to liberally mix 1-forms and vector fields in what follows, since we have Euclidean structure.)
You want a function $f$ such that $\nabla f$ is proportional to $\omega$. Consider the ODE system $$\dot x =P(x,y), \quad \dot y=Q(x,y)\tag1$$ By choosing coordinate system, we can make $p$ the origin and arrange $P\ne 0$, $Q=0$ at $p$. In a small neighborhood of $p$, the streamlines of $(P,Q)$ are approximately vertical; therefore they cross the $y$-axis exactly once.
Consider the flow map $\Phi(x,y,t) = (u,v)$ where $(u,v)$ is the value of the solution of $(1)$ at time $t$, with initial condition of being at $(x,y)$ at time $0$. The general ODE theory says that $\Phi$ is smooth. Use the implicit function theorem to solve for $t$ such that $u=0$ in terms of $x,y$. (The theorem applies because the derivative of the $u$-component of $\Phi$ with respect to $t$ is nonzero, thanks to $(P,Q)$ having nonzero horizontal component).
The function $t = f(x,y)$ is smooth, has nonzero gradient, and $\nabla f$ is proportional to $(P,Q)$. (Yes, there is more work here.)