
didnt she say that she fell in love with him the first time she talked to him at the sidewalk? then she found out he liked someone else. but if you were dying and you knew your time was going to run out u might as well yolo it and fall in love, she knew shed regret it if she didnt

Rather than her getting involved with him knowing she was dying, it's more like she felt she'd be okay dying if it meant being able to get involved with him. Since her disease only grew when she did and she only decided to grow after falling in love and really getting to know him/started living with him. It's a strange catch 22 isn't it?
If she knew she was going to die why did she get so involve with him knowing he liked someone already