To fix the distance issue you need to make it into a condition as well,
if(Bob) {
var distance = Vector3.Distance(Bob.position, transform.position);
if (distance>.5)
GUI.Button(Rect(10,10,100,16),"Hello Player");
}
Keep in mind you should have your GUI elements within OnGUI(). Another thing is that your original rect size is too small to fit the text “Hello Player”, a rect is defined with offset from left, offset from top, width and height. Increase the third, and probably the forth, value a bit.