Here is what i did. Not sure if this is correct. Will have update next week.
I plotted these 4 points on a graph with x1 and x2 on x and y axis respectively. since its a unit step function, which essentially has 1 or 0 output - i tried to draw a linear regression line such that all "0" result points are on 1 side and "1" result points are on other. This gave me the possible weights w1 and w2 and i constructed an equation
w1= 1.5 and w2 = 0.5
Then i made a table to check if the equation provided the actual results
i started adjusting the w1 and w2 to try to "fit" to training data but one data was just not working!!
i could bring the error down at w1=1 and w2 =0.39
Then - the threshold value, T
it should be in such a way that the z = x1w1+x2w2 + T and y=0 if z<0 and y=1 if z<=0. The value of T should change the results of (0.2,-0.5 ) to fit but not change the result of other points. So i started at -0.4 and worked my way up to -0.44.
Final equation came out to be.
y = x1 + 0.39x2 -0.44
This fits the current training data.