Lately, I have been practicing conversion to WFF and am trapped in the following example:
A person may steal something if the person is a thief and the person likes the thing and the thing is valuable.
Converting this statement to WFF could have the possible solutions:
1. ∀x ∃y person(x) ^ steal(x,y) → thief(x) ^ likes(x,y) ^ valuable(y)
2. ∀x ∃y person(x) ^ thief(x) ^ likes(x,y) ^ valuable(y) → steal(x,y)
Now I am confused which one is correct. Since the statement has if later it shall represent the second because one may read it as "If the person is a thief and the person likes the thing and the thing is valuable then the person may steal something." but first one is a little more intuitive.
What would be the correct formula for the given statement?
I think the sentence is fundamentally ambiguous. I can see two ways to read it based on the interpretation of "something". If we read "something" as just a generic predicate, then the sentence is laying some conditions under which theft is likely but not guaranteed. In that case the sentence should be a $\forall\,\forall$ sentence. For what it's worth, this intepretation seems more natural to me.
Another way to interpret it is to do exactly what you did for your first example, which is to say that every thief has at least one likely target. Based on how the sentence is structured I think this is a less plausible interpretation.
In the first reading, we are not promising the existence of at least one possible valuable item for every thief to steal, we are laying out some rules for when theft is likely. $x$ may steal $y$ can also be interpreted as "it is permissible for $x$ to steal $y$", but I will go with the "likely" interpetation for this answer.
Let's use $P(x)$ for person, $T(x)$ for thief, $L(x, y)$ for likes and $V(x)$ for valuable. Let's use $M(x, y)$ to denote $x$ is likely to steal $y$.
Slightly paraphrasing your sentence gives us something the following:
We can express that as follows, using the notation $\forall x : P . \varphi(x)$ as a convenient alternative notation for $\forall x \mathop. P(x) \to \varphi(x)$.
$$ \forall x : P \mathop.\; \forall y : V \mathop.\; T(x) \land L(x, y) \to M(x, y) $$
This is equivalent to
$$ \forall x \mathop. \forall y \mathop. P(x) \land V(y) \land T(x) \land L(x, y) \to M(x, y) $$
This is similar to your second sentence, but the quantifiers are $\forall \, \forall$ rather than $\forall \, \exists$.
Another possible way to translate this sentence that captures an existential reading of "something" is the following. I think this interpretation is less likely given the sentence structure of the prompt, but it is possible.
$$ \forall x : P \cap T \mathop. \exists y : V \mathop. L(x, y) \land M(x, y) $$
$$ \forall x \mathop. P(x) \land T(x) \to \exists y : V \mathop. L(x, y) \land M(x, y) $$
$$ \forall x \mathop. \lnot P(x) \lor \lnot T(x) \lor \exists y : V \mathop. L(x, y) \land M(x, y) $$
$$ \forall x \mathop. \exists y \mathop. \lnot P(x) \lor \lnot T(x) \lor V(y) \land L(x, y) \land M(x, y) $$
$$ \forall x \exists y \mathop. P(x) \land T(x) \to V(y) \land L(x, y) \land M(x, y) $$