"Another subfloor question," in the Ceramic and Stone Q&A forum, begins: "This is a very good article written for situations exactly like yours. Take a few minutes to read it, and ..."
This is a very good article written for situations exactly like yours. Take a few minutes to read it, and follow it during your underlayment installation.
Keep in mind-- first, with 5/8" plywood, the minimum is 1/2" CBU. Also, with reference to using 3/4" under the tile and 5/8" under the hardwood, that would put you in the position of having to set your tile over single layer subflooring-- guaranteed disaster for the tile. You NEED two layers.
Do 3/4" subfloor throughout, and use 1/4" cement board under the tile. Trust me-- you'll be just about flush.