In CNF, every production is of the form

- $A \to BC$
- $A \to d$ ($d$ is a terminal).

We are given a word of length $2^k$ meaning we reached $2^k$ terminals during parsing. If we consider the start symbol as root, the parse tree will be a strict binary tree (need not be a complete binary tree, a strict binary tree is a binary tree where every non-leaf node has two children) till the second last level with $2^k$ nodes and in last level we have $2^k$ leaf nodes corresponding to the terminals. So, our problem now reduces to the number of nodes in a strictly binary tree with $2^k$ leaf nodes.

If you know the property of strict binary tree answer is $2^{k+1} - 1$ and adding the $2^k$ leaf nodes we get the required answer as $3.2^k - 1$ nodes. Otherwise we can see the binary tree till the second last level as a graph with $n$ nodes and $n-1$ edges. We have $2^k$ nodes of degree 1 (leaf nods), a root node of degree 2 and $n - 2^k$ nodes of degree 3. So, sum of degrees $= 2^k + 2 + 3. (n - 2^k - 1)$.

In a graph, sum of degrees = 2. number of edges.

So,

$$2^k + 2 + 3.(n - 2^k - 1) = 2(n-1) \\\implies n = 2.2^k - 1 = 2^{k+1} - 1. $$

Adding the $2^k$ leaf nodes we get the number of nodes as $3.2^k - 1.$

Ref: http://web-ext.u-aizu.ac.jp/~hamada/AF/Compact-L5-Final-2.pdf

Alternatively,

Number of derivation steps for a string of length $n$ from a grammar in CNF is given by $2n-1$. Here, $n=2^k$. So, number of derivation steps $=2\times 2^k - 1 = 2^{k+1} -1.$ To get the total number of nodes, we can add the $2^k$ leaf nodes to get $2^{k+1} - 1 + 2^k = 3.2^k -1$