Das ist einfach nur Polynomdivision in Z5. Gibt
(x^5+4x^4+2x^3+3x^2+2x+4):(2x^2+x-3)=3x^2+3x^2 +4x + 4 
x^5 +3x^4+ x^3
---------------------
          x^4  + x^3 + 3x^2
          x^4  +3x^3 +  x^2
          ------------------------
                   3x^3 + 2x^2 +2x
                   3x3  +4x^2  +3x
                   ---------------------
                              3x^2 + 4x  + 4
                              3x^2  +4x  - 2
                              --------------------
                                                   1
also q(x)=3x^2+3x^2 +4x + 4  und r(x)=1 .
Aber rechne mal in Ruhe nach.