It depends on the DBMS system being used and the time frame you are trying to examine.
Your question is very simplified and leaves a lot of room for interpretation.
I put your transactions and crashes into a timeline and added one for the CHEKPOINT, because (depending on the DBMS) without a CHECKPOINT no write to disk.
Memory Time Line T1
R1(X)-----W1(X)
-----1---------1-------------> (t)
Memory Time Line T2
R2(Y)------W2(Y)
----------2----------2-------> (t)
Checkpoint Time Line (C)
Checkpoint
-----------------C-----------> (t)
Crash Time Line CR (X)
Crash
-------------------X---------> (t)
If T1 decides to begin a transaction R1(X) and the commits the transaction W1(X) then everything is still in memory. At a certain point in time the DBMS will decide to write the contents of memory to disk (Transaction Log in SQL Server/UNDO - REDO Tablespace in Oracle). The Transaction Log then has knowledge of the transaction that were previously in memory. They are on disk. This includes the start of the transaction T2 with its Read R2(Y)
When the system crashes and no writes can be performed, then everything in memory is lost.
Your disk timeline (TLog / Redo - Undo TS) will look like this at the point of the crash:
Disk Time Line
R1(X)------W1(X)
-----1----------1C-----------> (t) [T1]
R2(Y)--|
----------2------C-----------> (t) [T2]
-----------------C-----------> (t) [Checkpoint]
-------------------X---------> (t) [Crash]
Everything after the CHECKPOINT that couldn't be written to disk is lost and everything that was CHECKPOINT-ed will either have to be COMMIT-ed or UNDO-ne.
The interval at which CHECKPOINTs are issued is controlled by the DBMS and can be modified (e.g. Microsoft SQL Server) by the DBA to prevent data loss.
A crash will end any transactions that were in memory. Any BEGIN transactions that happened after the CHECKPOINT won't be stored on disk and don't have to be UNDO-ne or REDO-ne.
Microsoft SQL Server
Database Checkpoints (SQL Server)
A checkpoint creates a known good point from which the SQL Server Database Engine can start applying changes contained in the log during recovery after an unexpected shutdown or crash.
Configure the recovery interval Server Configuration Option
The recovery interval option defines an upper limit on the time recovering a database should take. The SQL Server Database Engine uses the value specified for this option to determine approximately how often automatic checkpoints to issue automatic checkpoints on a given database.