2 months of work for $6000? While making money probably wasn't the only reason for doing it, isn't that a pretty bad payoff? I know you will keep making sales, but (especially for technical writing) it will have a short shelf life...
The kind of technical books that have short lives are ones about specific products/versions. This is a book about creating programming languages by the sounds of it.
Other books in this field are still available at my local mass market bookstore after 15-20, even 30 years in print.
It took him 2 months but we don't know how many hours per day. Also this was the first book he wrote, maybe with the next one he'll make 6000 in one week. You can't expect to win big the first time.
Of course I was not working full time on this. Most publishers give an advance of $6K when writing a full book, which can take a year or so. Nice article about this: http://beginningruby.org/what-ive-earned-and-learned/