kill(all)$

given :  -2*x-5*y+3*z+5*u=0

kk:[x,y,z,u]$
for i:1 step 1 thru length(kk) do
   v[i]:0$
t:-2*x-5*y+3*z+5*u=0;

for i:1 step 1 thru length(kk) do
  k[i]:coeff(lhs(t),kk[i])$

for ii:1 step 1 thru length(kk) do
 if k[ii] < 0 then
    v[ii]:k[ii]*kk[ii]$
 tt:sum(v[ii],ii,1,length(kk));

tl:lhs(t)-tt$
tr:rhs(t)-tt$

result:  3*z+5*u=5*y+2*x

tl=tr;