The starting point with algebraic fractions is to factorise wherever possible.
#color(blue)((2x^2 +5xy+2y^2))/color(red)((4x^2-y^2)) div color(green)((x^2+xy -2y^2))/(color(purple)((2x^2 +xy -y^2))#
#"quadratic trinomial"/"difference of squares" div "quadratic trinomial"/"quadratic trinomial"#
#=color(blue)((2x+y)(x+2y))/color(red)((2x+y)(2x-y)) xx color(green)((x+2y)(x-y))/color(purple)((2x-y)(x+y))#
To divide by a fraction, multiply by the reciprocal:
#=color(blue)((2x+y)(x+2y))/color(red)((2x+y)(2x-y)) xx color(purple)((2x-y)(x+y))/color(green)((x+2y)(x-y))#
When you multiplying you can cancel the like factors
#=(cancel((2x+y))cancel((x+2y)))/(cancel((2x+y))cancel((2x-y))) xx (cancel((2x-y))(x+y))/(cancel((x+2y))(x-y))#
#=(x+y)/(x-y)#