You did not describe what the "original" orientation of the camera
actually is, that is, what the unrotated camera looks like.
I'll suppose that the camera would be pointing along the positive $x$-axis
and that a vector from the center to the "top" of the camera would point
in the direction of the positive $z$-axis.
Now let's say you want the camera pointing downward at a $45$-degree angle
in the $x,z$ plane, that is, the axis of the camera will be
in the direction of the vector
$\left[\frac{\sqrt2}{2}, 0, -\frac{\sqrt2}{2}\right]$,
and that the direction to the "top" of the camera will
also still be in the $x,z$, plane, in the direction
$\left[\frac{\sqrt2}{2}, 0, \frac{\sqrt2}{2}\right]$.
You get the camera into this orientation by rotating it $45$ degrees
($\pi/4$ radians)
around the $y$-axis, that is, using the rotation quaternion
$\left[0, \sin\left(\frac\pi8\right), 0, \cos\left(\frac\pi8\right)\right]$
(or maybe that should be $-\sin\left(\frac\pi8\right)$ instead of
$\sin\left(\frac\pi8\right)$; it depends on which way is a
"positive" rotation around the axis).
In short, the axis of rotation that turns your camera to the desired orientation
is usually nowhere near the axis along which the camera ends up pointing.
The axis and angle to achieve a general orientation is not usually as
obvious as in this simple case. Rather than trying to guess it directly,
you are probably better off performing a series of simple rotations,
for example elevate or depress the angle of the camera and then rotate
it around the vertical axis (the $z$ axis in my example, or whichever of
the axes is vertical in your system). If you also want the camera
to be "twisted" around its own axis, then you might want to
rotate it about that axis before the other two rotations.
To represent a sequence of rotations,
you multiply together the quaternions for each rotation.
You then have a single quaternion that represents a single rotation
taking the camera from its original orientation to the desired orientation.
This is indeed undefined when you are missing the depth information.
If the rotation axis is fixed, all points are moving on ellipses of various extents, as seen on these cylinders, so the new positions aren't completely undefined.
If you have two pictures of the same object, stereoscopy allows you to reconstruct the 3D model.
Best Answer
Let the origin be at the intersection of the $3$ planes.
I follow the $xyz$-orientations of the first diagram: upward as positive $x$, leftward as positive $y$, and out from screen as positive $z$.
Along the plane of object $A$, points have positive $x$- and $z$-coordinates that satisfy:
$$(x ,y ,x\tan(180^\circ-135^\circ)) = (x, y, x)$$
Along the plane of the new object $B$ that is rotated away from the $xz$-plane, points have positive $y$- and $z$-coordinates that satisfy: $$(x, z\tan30^\circ, z) = \left(x, \frac{z}{\sqrt3}, z\right)$$
Combining the two conditions, points along the intersection ray of objects $A$ and $B$ have positive coordinates that satisfy:
$$\left(x, \frac{x}{\sqrt3}, x\right) = \left(\sqrt3 y, y, \sqrt3 y\right) = \left(z, \frac{z}{\sqrt3}, z\right)$$
Picking any point on this intersection ray, for example $\left(\sqrt3, 1, \sqrt3\right)$, to find the angle $\theta$ between this ray and the negative $x$-axis by dot product,
$$\begin{align*} \left(\sqrt3, 1,\sqrt3 \right)\cdot(-1,0,0) &= -\sqrt3\\ \left\|\left(\sqrt3, 1,\sqrt3 \right)\right\| \left\|(-1,0,0)\right\|\cos\theta &= -\sqrt3\\ \sqrt7\cdot1\cos\theta &= -\sqrt3\\ \cos\theta &= -\frac{\sqrt3}{\sqrt7}\\ \theta &= 130.9^\circ \end{align*}$$