How to write two number in .txt by TEdit and converting them into two int variables?

I want to make a simple program that contains 2 integers, 1 Button, 2 Text Boxes and a .txt file.

So first, write on 'Text box 1' two numbers. Between these two numbers, one space, and save directly to .txt file.

Second step needs to output these two numbers into 'Text Box 2', but in 'Text Box 2' should write like this:

"First  number is: "
"Second number is: "

And convert these two numbers into integers so it can be used later.

My code:


#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include "Unit2.h"
#include <fstream>
#include <iostream>
#include <string>
#pragma hdrstop

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void PriceUpdate() {
    //myfile.close();
}

String summa(TMemo *k) {
    float dist, transport, fuelPrice,totalPrice, petrol, diesel;
    String mes, mes2;
    k->Clear();

    dist = StrToFloat(Form1->Edit1->Text);
    fuelPrice = 6;

    if (Form1->RadioGroup1->Buttons[0]->Checked == true) {
        transport =  StrToFloat(Form2->LabeledEdit1->Text);
    }
    if (Form1->RadioGroup1->Buttons[1]->Checked == true) {
        transport =  StrToFloat(Form2->LabeledEdit2->Text);
    }
    if (Form1->RadioGroup1->Buttons[2]->Checked == true) {
        transport =  StrToFloat(Form2->LabeledEdit3->Text);
    }

    if (Form1->CheckBox1->Checked) {
        totalPrice = (((dist * transport) / 100) * fuelPrice) * 2;
    }
    else {
        totalPrice = ((dist * transport) / 100) * fuelPrice;
    }

    mes = FloatToStrF(totalPrice, ffFixed,8,2) + " Руб.";
    k->Lines->Add(mes);

    return mes;
}

//---------------------------------------------------------------------------

void __fastcall TForm1::N3Click(TObject *Sender)
{
    Form1->ClientWidth=786;
    Form1->ClientHeight=409;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N2Click(TObject *Sender)
{
    Form2->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    summa(Memo1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
    float petrol, diesel;

    ifstream price;
    price.open("save.txt");

    if (!price.eof()) {
        price >> petrol;
        price >> diesel;
    }
}
//---------------------------------------------------------------------------

This is an example picture of how it should look:

image