Do you mean "n leaves" or "n nodes"? If leaves, then why is there a sum from 0 to x?

Second, considering this sum assumes that the binary tree is perfect. It is rather obvious that a perfect tree has the least height for a given number of nodes, but it may require some thought to show it formally, and it has to be at least stated.

I assume you mean .

I don't know what q means. This is the sum of geometric progression.

We have because for and .

Also, because when , i.e., .