clear all
pa=12500;
pb=3500; 
pc=2000;
ra=6000; rb=ra; rc=ra;
b=[pa; -pb; -pc; 0]
A=zeros(4);
A(1,1)=ra;
A(2,2)=rb;
A(3,3)=rc;
A(1,4)=1;
A(2,4)=-1;
A(3,4)=-1;
A(4,1)=1;
A(4,2)=-1;
A(4,3)=-1;
format long
A\b