You can't close it like that - you have to close the instance of Form2 that is actually showing.
Try this:
private Form2 myForm;
private void button1_Click(object sender, EventArgs e)
{
myForm = new Form2();
myForm.Show();
}
private void listBox5_Click_1(object sender, EventArgs e)
{
if (listBox5.Text == ("close form 2"))
{
myForm.Close();
}
}