No It does not work that way, transactions are included in blocks and if your bot detects the address has already sent the transaction, meaning it has received at least 1 confirmation, then even if you prompt your system to send some bitcoin to the address at the time of notification, the network delay would have its effect and every new block has a delay of approximately 10 minutes before it is mined and it may be longer if there is higher network difficulty in finding the valid hash to confirm the transactions in the new block.
It depends on how the bot detects the transaction. If the bot is checking the blockchain it would be too late, but usually you'd monitor the mempool for a case like this.
Even if he monitors the mempool, he gets notification when the transaction has received at least one confirmation because before then the transaction has not been confirmed and from his explanation, he wants to send the second transaction as soon as the first one reaches its destination, meaning it must be confirmed first and in the mempool you use the transaction ID to track transactions that has been confirmed and not those that has been included in a block. to do this he would have access to the transaction ID, meaning the transaction have been created earlier and would only be broadcasted at a specified time.
something like this
using mempool.space APIasync function checkTxConfirmed(txid) {
const res = await fetch(`https://mempool.space/api/tx/${txid}`);
const confirmTX = await responseres.json();
return confirmTX.status.confirmed; // this would be true if transaction has been confirmed
}