In the book Logic and Structure written by Dirk van Dalen, something like $(\forall x)(\phi \rightarrow (\exists x) \psi ) $ (where x is the only free variable in $\psi$ and $\phi$) is a sentence.
But I just don't know how to evaluate this, the book doesn't explain this or show any example like this, but it does appear in the some of the exercices.
I tried to treat it as if it was equivalent to $((\forall x)\phi \rightarrow (\exists x)\psi)$ but sadly, it's not.
If anyone is familiar with these concepts, I'd appreciate any kind of help :)
What do you mean by "evaluate"? Determine its truth value in a structure? It goes just like any other formula, according to the definitions of interpretation:
$\begin{align} & \mathfrak{A} \vDash \forall x (\phi \to \exists x \psi)\\ \Leftrightarrow\ & \text{for all } a \in A, \mathfrak{A} \vDash (\phi \to \exists x \psi)[\overline{a}/x]\\ \Leftrightarrow\ & \text{for all } a \in A, \mathfrak{A} \vDash \phi[\overline{a}/x] \to \exists x \psi\\ \Leftrightarrow\ & \text{for all } a \in A, [\mathfrak{A} \nvDash \phi[\overline{a}/x] \text{ or } \mathfrak{A} \vDash \exists x \psi]\\ \Leftrightarrow\ & \text{for all } a \in A, [\mathfrak{A} \nvDash \phi[\overline{a}/x] \text{ or for some } b \in A, \mathfrak{A} \vDash \psi[\overline{b}/x] ] \end{align}$
So for all objects, either $\phi$ has to be false of that object, or for that object there has to be another object of which $\psi$ is true.
Note that the $\exists x$ "overwrites" the binding of $x$ by $\forall$; the $x$'es that occur in $\psi$ are existentially quantified and not effectively affected by the universal quantifier although it techically has scope over the entire formula.
In general we have the following logical equivalences (in van Dalen they appear as exercise 2 in chapter 2.5):
$\begin{align} & \forall x (\phi \to \psi)\\ ⟚ \ & \exists x \phi \to \psi \end{align}$
and
$\begin{align} & \exists x (\phi \to \psi)\\ ⟚ \ & \forall x \phi \to \psi \end{align}$
$\begin{align} & \forall x (\phi \to \psi)\\ ⟚ \ & \phi \to \forall x \psi \end{align}$
and
$\begin{align} & \exists x (\phi \to \psi)\\ ⟚ \ & \phi \to \exists x \psi \end{align}$
That is, quantifiers switch to their dual when moving them between outside the formula and the left-hand side of an implication, and remain the same when moving them between outside the formula the right-hand side of an implication.
Thus, since $x$ only occurs bound on the RHS of the implication, $\forall x (\phi \to \exists x \psi)$ is logically equivalent to
$$(\exists x \phi \to \exists x \psi)$$
So the above can more easily be rephrased as