Well, there is no short answer about how to write a mystery. I have a book I'm compiling about writing the mystery now, but I'm afraid that won't help you at the moment.
I start my novels with a character sketch, a problem and and idea on how to solve that problem.
All my sleuths are accidental sleuths meaning they aren't in law enforcement they start out just to help a friend or colleague. If you read a lot of mysteries you already have a pretty good handle on how to write them.
I hope this helped some.