You have to put the literal strings in the right stopspot. You have them as part of the FROM clause, which doesn't make sense. Put them in the select-list.
insert into locations (geom,type,label,user) select
st_makeline(a.geom,b.geom) as line, 'Link','test','ADMIN'
from (select * from locations where id = 144) as a,
(select * from locations where id = 145) as b;