I listened to a podcast about it ages ago, and if my memory serves me correctly - the book was started first but wasn't finished until after the movie had been completed. Kubrick couldn't wait for Clarke to finish the book, so he carried on with the production of the movie. I think Clarke wanted to release the book first, but Kubrick wasn't going to wait for him!