First of all, it is obvious that the normal vector of the upper surface is $(0,1,0)$. But you can calculate it in the following way:
Given three points on a surface that are not aligned, you can calculate the normal direction. A very simple way is to use the cross product
$n = |(p1 - p0)$ x $(p2 - p0)|$ . With this formula you have to be careful which points you choose for $p0$, $p1$ and $p2$, because the cross product gives the orthogonal direction of the two input vectors according to the right-hand rule.
What is the right hand rule?
Figure 1: Copied from Wikipedia. Shows how to easily remember the direction of the result of a cross product. (according to the right hand rule (Do NOT use the left hand ;P ))
So the result of $a$ x $b$ is not the same as $b$ x $a$. So the cross product is not commutative! When calculating the normal vector, this should be taken into account! The length of the result of the cross product must be normalized.
Once we have the normal vectors of all 6 surfaces, we can proceed with the formula.
$$I_{RGB}(x) = \frac{2n(x) * I + 1}{3} * (1,0,1) + \frac{1-n(x)*I}{3} * (1,1,1)$$
The question of the professor is not well defined, because the light source direction vary depending on the position of the point on surface... I would expect a well divined question from a university... The question could be defined when saying: the light source is infinity far away, which leeds to a directional light source. Or in case inside the course you only talked about directional light sources, they need to define the light cast direction. But when looking at the answer of the professor we see, that he/she expect you to use the direction of: $|lightPosition - centerCube|$. Therefore we know the value of $I = (0,1,0)$ (where, $I$: the unit light source direction,) (so this vectors is normalized). So if we substitute $I$ into the equation, we get:
$$I_{RGB}(x) = \frac{2n(x) * (0,1,0) + 1}{3} * (1,0,1) + \frac{1-n(x)*(0,1,0)}{3} * (1,1,1)$$
Lets start with the top face:
$$n = (0,1,0)$$
So placing the vector into the formular:
$$I_{RGB}(x) = \frac{2(0,1,0) * (0,1,0) + 1}{3} * (1,0,1) + \frac{1-(0,1,0)*(0,1,0)}{3} * (1,1,1)$$
because $n(x)*I$ is the dot product, we can shorten the equation:
$$I_{RGB}(x) = \frac{2 + 1}{3} * (1,0,1) + \frac{1-1}{3} * (1,1,1)$$
$$= 1 * (1,0,1) + 0 * (1,1,1)$$
$$= (1,0,1)$$
$(1,0,1)$ as RGB value is pure magenta.
Lets continue with the bottom face:
$$n = (0,-1,0)$$
So placing the vector into the formular:
$$I_{RGB}(x) = \frac{2(0,-1,0) * (0,1,0) + 1}{3} * (1,0,1) + \frac{1-(0,-1,0)*(0,1,0)}{3}*(1,1,1)$$
Lets shorten it like above, gives you:
$$I_{RGB}(x) = \frac{-2 + 1}{3} * (1,0,1) + \frac{1-(-1)}{3}*(1,1,1)$$
$$= (-\frac{1}{3},0,-\frac{1}{3}) + (\frac{2}{3},\frac{2}{3},\frac{2}{3})$$
$$= (\frac{1}{3},\frac{2}{3},\frac{1}{3})$$
Lets continue with the front face:
$$n = (0,0,1)$$
So placing the vector into the formular:
$$I_{RGB}(x) = \frac{2(0,0,1) * (0,1,0) + 1}{3} * (1,0,1) + \frac{1-(0,0,1)*(0,1,0)}{3}*(1,1,1)$$
Lets shorten it like above, gives you:
$$I_{RGB}(x) = \frac{0 + 1}{3} * (1,0,1) + \frac{1-0}{3}*(1,1,1)$$
$$= (\frac{1}{3},0,\frac{1}{3}) + (\frac{1}{3},\frac{1}{3},\frac{1}{3})$$
$$= (\frac{2}{3},\frac{1}{3},\frac{2}{3})$$
I'll stop here, for the other 3 faces it works the same way...