The problem is that you create a new instantiation of Class1 in each of your button handlers so the information is lost. You need to instantiate your object outside of those handlers, something like:
Class1 yeni;
private void button1_Click(object sender, EventArgs e)
{
yeni = new Class1();
string[] dizi = yeni.solution(textBox1.Text, textBox2.Text, textBox3.Text);
string metin = "";
for (int i = 0; i < dizi.Length; i++)
metin += dizi[i];
}
private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Add(yeni.show());
}