The word is murder by Anthony Horowitz
Anthony Horowitz has writers block and a deadline for a new story. That is when Daniel Hawthorne, a retired detective comes to him with a proposition. A woman has been murdered hours after arranging her funeral and Hawthorne wants to write (with Horowitz’s help) the true story of it. Once they’ve proved it was murder and solved the murder of course. Daniel Hawthorne is quite a character as we learn but very wary of revealing too much of himself to Horowitz. Hawthorne solves mysteries/murders in the exact opposite way that Horowitz writes a story so Horowitz is unsure he can work with Hawthorne. Suspects are gradually revealed and red herrings planted in your mind as you solve the mystery alongside Horowitz and Hawthorne.
An amusing exploration of a murder with twists and turns right to the end, that makes it book you don’t want to stop reading.
I’m looking forward to number 2 in the series.