Adding the fractions on the RHS of the equation in the usual way gives
A/(2-x) + B/(1+3x) = (A(1+3X) +B(2-X))/((2-X)(1+3X)) = (5x +4)/((2-x)(1+3x))
This gives an expression for the original numerator in terms of A B and x.
A(1+3X) +B(2-X)) = 5x +4
Take values of x which simplify the equation e.g x = 2, -1/3
Gives A = 2, B = 1
So (5x +4)/((2-x)(1+3x)) = 2/(2-x) + 1/(1+3x)