kill(all)$

van = facebook.com/LearningCalculus$

f(w,u):=2+3/w + 3/w^2=u$
rhs:[0, -1, 1+w, 1+w^2]$
l:makelist(f(w,rhs[i]),i,1,4)$
h[i,j]:=l[i]$
M:genmatrix(h,4,1)$
r[i,j]:=fullratsimp(solve(M[i][1],w))$
N:genmatrix(r,4,1)$

[M[1][1],N[1][1]];

[M[2][1],N[2][1]];

[M[3][1],N[3][1]];

[M[4][1],N[4][1][1],N[4][1][2]];

[M[4][1],N[4][1][3],N[4][1][4]];