Given a directional derivative to find a point Let $ f(x,y,z)$ be differentiable, and assume that
$$ f(x, y, x^2 + y) = 3x - y $$
(for all values of $x,y$).
Also, given the direct-derivative of the point $A=(0, 12, 12)$ and the direction vector is $(1, 0, 1)$ is equal to $3$, I need to find the gradient of $f$ at $A$.
I have no idea how to even start, because $f$ is not given explicitly, only the derivative — but again, not explicitly for $f(x,y,z)$, but for this weird combination $f(x, y, x^2 + y)$.
What should I do?
 A: Let $\Big(\nabla{f}\Big)(0,12,12)=\big<a,b,c\big>$. Notice how $$3=\Big(\nabla{f}\Big)(0,12,12)\cdot \Bigg<\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}}\Bigg>=\frac{a+c}{\sqrt{2}}$$ We also have from chain rule $$f_{x}(x,y,x^2+y)+2xf_z(x,y,x^2+y)=3$$ $$f_{y}(x,y,x^2+y)+f_z(x,y,x^2+y)=-1$$ Plugging in $x=0,y=12$ into the above expressions produces the two equations $$a=3$$ $$b+c=-1$$ Solving this systems yields $a=3,b=2-3\sqrt{2},$ and $c=3\sqrt{2}-3$ i.e. $$\Big(\nabla{f}\Big)(0,12,12)=\Bigg<3,2-3\sqrt{2},3\sqrt{2}-3\Bigg>$$
A: Using the chain rule:

$$\frac{ \partial}{ \partial x} f(x,y,x^2 + y) = f_x(x,y,x^2 + y) \cdot \frac{ \partial}{ \partial x} (x) + f_y (x,y, x^2 + y) \cdot \frac{ \partial }{ \partial x}(y) + f_z(x,y,x^2 + y) \cdot \frac{\partial }{\partial x} (x^2 + y) = f_x(x,y,x^2 + y) + 2x \cdot f_z(x,y,x^2 + y) = \frac{\partial}{ \partial x}(3x -y) = 3 
f_x(x,y,x^2 +y) = 3- 2x f_z(x,y,x^2+y) $$

Notice that $A$ fits perfectly to the $x,y, x^2 + y$ pattern ($0^2 + 12 = 12 = A_z$) Thus:
$$ f_x(0,12,12) = 3- 2 \cdot 0 \cdot f_z(x,y,x^2+y) = 3$$
So we have one third of the gradient at the point $A$.

Using the chain rule again but now differentiating on $y$:
$$ f_y(x,y,x^2 + y) = f_x(x,y,x^2 + y) \cdot (x)_y + f_y(x,y,x^2 + y) \cdot (y)_y + f_z(x,y,x^2 + y) \cdot (x^2  +y)_y \\=  f_y(x, y,x^2 +y) + f_z(x,y,x^2 + y) = (3x -y)_y = -1 \\ \Rightarrow \color{red}{f_y(0,12,12) + f_z(0,12,12) = -1} $$

Now using the directional derivative:
First we need to normalize the direction vector, which is given by $$ \frac{1}{||(1,0,1)||} \cdot (1,0,1) = ( \frac{1}{\sqrt{2}} , 0, \frac{1}{\sqrt{2}})$$
Now using the fact that the function is differentiable, you don't need to actually calculate the derivative by definition, we can just use this known formula (which is equal to $3$ according to the question):
$$ \nabla f(0,12,12) \cdot ( \frac{1}{\sqrt{2}} , 0, \frac{1}{\sqrt{2}}) = 3$$
By the definition of the gradient at point $A$, it is equal to all the vector of all partial derivatives at that point:
$$ \nabla f(0,12,12) = \left ( f_x(0,12,12), f_y(0,12,12) , f_z(0,12,12) \right ) $$
Regular dot multiplication gives us:
$$ f_x(0,12,12) \cdot \frac{1}{\sqrt{2}} + 0 \cdot f_y(0,12,12) + f_z(0,12,12) \cdot \frac{1}{ \sqrt{2}} = 3$$
Now, we already know what is the value of $f_x(0,12,12)$ and it is equal to $3$. Substituting back gives us:
$$f_z(0,12,12) \cdot \frac{1}{\sqrt{2}}  = 3 - \frac{3}{\sqrt{2}} \\ f_z(0,12,12) = 3 \sqrt{2} - 3$$
Recall the red equation, we can substitute $f_z$ back and get:
$$ f_y(0,12,12) = -1 -f_z(0,12,12) = -1 -3 \sqrt{2} + 3 = 2 - 3 \sqrt{2} $$
Thus we can finally say that the answer is:
$$ \nabla f(0,12,12) = (3, 2-3\sqrt{2}, 3 \sqrt{2} -3 ) $$
And rest.
A: It is possible that the directional derivative is being treated as a linear operator (i.e. the Gateux derivative). I'm assuming this is true, so I won't normalise (not least because it's a lot simpler!). Whether you should or not depends on the definition given in your course.
Let $\nabla f: \mathbb R^3 → \mathbb R^3$ denote the gradient of $f$, and let
$$g(x,y) = (x,y,x^2+y).$$
In particular, we have the derivative (Jacobean?)
$$Dg(x,y) = \begin{pmatrix}1&0\\0&1\\2x&1\end{pmatrix},$$
for our point $A = g(0,12)$, we'll just need
$$ Dg(0,12) = \begin{pmatrix}1&0\\\ 0&1 \\\ 0&1 \end{pmatrix}.$$

Firstly, with my assumption, your directional derivative equation can be written as
$$ \nabla f(A) \cdot (1,0,1) = 3 $$
(this is one definition of directional derivative.)
As for the others, simply differentiate your first equation with respect to $x$ and $y$. The chain rule in matrix form says
$$
   \begin{align} (3,-1) 
= 
   \nabla_{(x,y)}
   \left( 3x - y \right) 
&=  
   \nabla \big( f(x,y,x^2+y)\big) 
\\\\&= 
   \nabla \big( f\circ g(x,y)\big) 
\\\\&=
\nabla f\big(g(x,y)\big)Dg(x,y):
\end{align}$$
i.e., $\nabla f$ evaluated at $g(x,y)$, (a row vector) multiplied by the matrix $Dg(x,y)$ on the right.
To get our point $A$, simply fix $(x,y) = (0,12)$, so that the previous equation becomes
$$ (3,-1) = \nabla f(A)\, Dg(0,12) = \nabla f (A)\begin{pmatrix}1&0\\\ 0&1 \\\ 0&1 \end{pmatrix}.$$
Now since, from before,
$$ 3 = \nabla f(A) \cdot (1,0,1) = \nabla f(A) \begin{pmatrix}1\\0\\1\end{pmatrix}, $$
This gives us a matrix equation:
$$(3,-1,3) = \nabla f \begin{pmatrix}1&0&1\\\ 0&1&0 \\\ 0&1&1 \end{pmatrix}.$$
Multiplying on the right by the inverse of the matrix on the right hand side will finish it off. Since the matrix is close to the identity, you can use two steps of row reduction to solve it, i.e. writing the simultaneous equations in matrix form,
$$\left(\begin{array}{ccc|r}1&0&0&3\\\ 0&1&1&-1 \\\ 1&0&1&3 \end{array}\right) → \left(\begin{array}{ccc|r}1&0&0&3\\\ 0&1&1&-1 \\\ 0&0&1&0 \end{array}\right) → \left(\begin{array}{ccc|r}1&0&0&3\\\ 0&1&1&-1 \\\ 1&0&1&3 \end{array}\right) → \left(\begin{array}{ccc|r}1&0&0&3\\\ 0&1&0&-1 \\\ 0&0&1&0 \end{array}\right).$$
The last matrix reads $\nabla f (A) = (3,-1,0)$. The normalised version of this simply gives you a harder matrix to invert, which other answers have done.
