We can see that the timeout starts when the packet loss occur, but how long is the timeout? Is it until the specific packet has been delivered and acknowledged or when?
Wrong. Look closely at the picture and you will see that the timeout starts exactly as the packet is being transferred, not when it is loss.
A node does not know the time of when a packet is loss (it is not possible). Before that, I will explain what is a timeout. When a node is sending a packet to another node (for example, using TCP), the sender node sets a timer for that packet to be replied. This is called a timeout. If a reply for the packet does not arrive within the timeout, the sender node will assume that a packet loss has occurred. This will cause the sender node to re-send/retransmit the packet.
So timeout is the time limit for the sender node to receive a reply from the destination node before retransmit the packet.
I'm just asking for what are indicating that a TCP timeout has been finished.
You can however determine when it is 'finished' or more precisely, what behavior does a sender do after the timer/timeout has been reached. As mentioned before, when a sender decides to retransmits a packet, it indicates that the timeout has been reached (or what you called as "timeout has been finished").