### Theory:

Rule 1: A variable is assigned to the value not known or to be found.

Let the number of apples that the boy initially had $$= x$$.

Rule 2: Then, the expressions can be formed in by the conditions specified in the question.

Number of apples given to sister $$= 3$$.

Number of apples left for the boy $$= 2$$.

Number of apples he had initially $$–$$ Number of apples given to the girl $$=$$ Number of apples the boy is left with.

Rule 3: The expressions are finally equated with the values given in the question.
Number of apples the boy left with:

$$x - 3 =2$$.

Thus, the equation set up is $$x-3 = 2$$.