You have to "remember" where you were when you clicked the button, so at class level, create a varaiable:
private TextBox lastUsed = null;
Handle the Leave event for all of the three textboxes with the same handler, and do this:
private void allMyTextBoxes_Leave(object sender, EventArgs e)
{
lastUsed = sender as TextBox;
}
Then, in your button click event, you can do this:
private void butPutTextInLastTextBox_Click(object sender, EventArgs e)
{
if (lastUsed != null)
{
lastUsed.Text = "Hello";
}
}