I suppose you mean that the shorter piece is 3 FEET more than 1/2 the longer! (Or did you mean 3"?
S = length of shorter piece and L = length of longer piece
S= 3 + (1/2)L
S + L = total length = 30
Substitute:
3 + (1/2)L + L = 30
(3/2)L = 27
L = 18 and S =12
You should check that these answers satisfy the original problem.