no matching unique or primary key for this column-list
you have a combined Primanry key.
So use
Create table Branch(
Bid int primary key,
Loc varchar(20),
Sid int,
Sname varchar(20),
foreign key(Sid,Sname) references spare(Sid,Sname)
);

Or you define in your spare table two new indexes for the column, so you can have different foreign keys