Conversion of a general linear program into a standard linear program I am trying to teach myself the basics of optimization of linear programmes, for example the following question:

How do I tackle such a question?
 A: The first inequality is $x_1-2x_2+x_3+x_4\leq 4$ 
To get an equality you have to add an slack variable. For this first inequality it is $y_1$. 
All slack variable are $y_i \geq 0 \ \ \forall i$
$x_1-2x_2+x_3+x_4+y_1= 4$ 
In the second inequality you have to substract (another) slack variable:
$-x_1+3x_2-x_3+2x_4 -y_2=5$
Now all constraints are equalities. In the next step you have to make all variables greater or equal to zero.

$x_3 \leq 0$ 
Here you can say, that $x_3=-x_3'$. Thus the definiton set for $x_3'$ is $x_3'\geq 0$
And in the linear programm you just insert $-x_3'$ for $x_3$
For the objective function it is 
$x_1+3x_2+2(-x_3')+x_4 \Rightarrow x_1+3x_2-2x_3'+x_4$ 
The same has to be done with the three constraints.

$x_2$ is a free variable. To get variables, which are greater or equal to zero, you define
$x_2=x_2^+-x_2^-$
$x_2^+,x_2^-\geq 0$
Thus the objective function is 
$x_1+3(x_2^+-x_2^-)-2x_3'+x_4 \Rightarrow x_1+3x_2^+-3x_2^- -2x_3'+x_4$
The same has to be done with the three constraints. 
After that, you repeat this step for $x_4$

After all, the definition set for all variables is $x_1,x_2^+,x_2^-,x_3',x_4^+,x_4^-,y_1,y_2 \geq 0$
