Peace sa-Nafooz
This is not really a difficult question to answer. The appointed time of a persons death is not always the time of their death. Allah (SWT) is indeed Aware of both and facilitates both.
If it is an accident, suicide or like then it is considered NOT the appointed time. However, since Allah (SWT) has given us freedom of choice and facilitates us in that choice when we make silly decisions or lapses causing accidents, then these are ‘freely’ facilitated to change the course of the destiny of that person.
Destiny is a path that is mapped out, but when it is walked on the paths of others cross it and cause it to alter. The dynamic equilibrium is fully in the knoweldge of Allah (SWT) as well as each path as though it were not to be influenced by anything else.