w1=.;
w2=.;
k1=.;
k2=.;
G=.;

H={{-m1 * (w^2) +k1+k2+G, -k2-G},{ -k2 , -m2*(w^(2 ))+k2}}

F={k1*x0+f1-f2, f2};
(*F={-f2, f2};*)

MatrixForm[H]
MatrixForm[F]

d=Simplify[Det[H]]
M=MatrixForm[Simplify[Inverse[H]*d]]

M[[1,2]]

x2=Simplify[(M[[1,2]].F)/d]

k1=m1*(w1^2);
k2=m2*(w2^2); 
x2=Simplify[x2]

x2 /. {f1->0,f2->0}

Simplify[x2 /. {f1->0,x0->0}]

x2 /. {f1->0,x0->0, G->-m1 (-(w^2)+(w1^2))}

Simplify[x2 /. {x0->0, G->-m1 (-(w^2)+(w1^2))}]

Simplify[x2 /. {f1->0,x0->0,  w -> Sqrt[(m1) (w2^2)/m1]}]