It appears you are trying to solve

R[a;b] = [c;d]

where

R = [x,y;-y,x].

Writing as a system of linear equations,

x*a + y*b = c

b*x - a*y = d

which may be rewritten

[a,b;b,-a][x;y]=[c;d]

which is solvable if a^2 + b^2 ≠ 0.

**EDIT:** Feeding the formula to Pari-GP produces the same values you got:

Code:

? matsolve([Mod(2,31),Mod(3,31);Mod(3,31),Mod(-2,31)],Mod(1/13,31)*[Mod(5,31);Mod(9,31)])
%1 =
[Mod(27, 31)]
[Mod(2, 31)]
? matsolve([Mod(2,31),Mod(3,31);Mod(3,31),Mod(-2,31)],Mod(1/13,31)*[Mod(4,31);Mod(11,31)])
%2 =
[Mod(14, 31)]
[Mod(17, 31)]
? matsolve([Mod(2,31),Mod(3,31);Mod(3,31),Mod(-2,31)],Mod(1/13,31)*[Mod(6,31);Mod(15,31)])
%3 =
[Mod(24, 31)]
[Mod(8, 31)]