Coefficient of determination in multiple linear regression: In multiple linear regression the coefficient-of-determination can be written in terms of the pairwise correlations for the variables using the quadratic form:
$$R^2 = \boldsymbol{r}_{\mathbf{y},\mathbf{x}}^\text{T} \boldsymbol{r}_{\mathbf{x},\mathbf{x}}^{-1} \boldsymbol{r}_{\mathbf{y},\mathbf{x}},$$
where $\boldsymbol{r}_{\mathbf{y},\mathbf{x}}$ is the vector of correlations between the response vector and each of the explanatory vectors, and $\boldsymbol{r}_{\mathbf{x},\mathbf{x}}$ is the matrix of correlations between the explanatory vectors (for more on this, see this related question). In the case of a bivariate regression you have:
$$\begin{equation} \begin{aligned}
R^2
&=
\begin{bmatrix}
r_{Y,X_1} \\[6pt]
r_{Y,X_2} \\[6pt]
\end{bmatrix}^\text{T}
\begin{bmatrix}
1 & r_{X_1,X_2} \\[6pt]
r_{X_1,X_2} & 1 \\[6pt]
\end{bmatrix}^{-1}
\begin{bmatrix}
r_{Y,X_1} \\[6pt]
r_{Y,X_2} \\[6pt]
\end{bmatrix} \\[6pt]
&= \frac{1}{1-r_{X_1,X_2}^2}
\begin{bmatrix}
r_{Y,X_1} \\[6pt]
r_{Y,X_2} \\[6pt]
\end{bmatrix}^\text{T}
\begin{bmatrix}
1 & -r_{X_1,X_2} \\[6pt]
-r_{X_1,X_2} & 1 \\[6pt]
\end{bmatrix}
\begin{bmatrix}
r_{Y,X_1} \\[6pt]
r_{Y,X_2} \\[6pt]
\end{bmatrix} \\[6pt]
&= \frac{1}{1-r_{X_1,X_2}^2} ( r_{Y,X_1}^2 + r_{Y,X_2}^2 - 2 r_{X_1,X_2} r_{Y,X_1} r_{Y,X_2} ).
\end{aligned} \end{equation}$$
You did not specify the directions of the univariate correlations in your question, so without loss of generality, we will denote $D \equiv \text{sgn} (r_{Y,X_1}) \cdot \text{sgn} (r_{Y,X_2}) \in \{ -1, +1 \}$. Substituting your values $r_{Y,X_1}^2 = 0.3$ and $r_{Y,X_2}^2 = 0.4$ yields:
$$R^2 = \frac{0.7 - 2 \sqrt{0.12} \cdot D \cdot r_{X_1,X_2}}{1-r_{X_1,X_2}^2}.$$
It is possible for $R^2 > 0.7$, since it is possible for the combined information from the two variables to be more than the sum of its parts. This interesting phenomenon is called 'enhancement' (see e.g., Lewis and Escobar 1986). You can read more generally about the geometric properties of regression quantities in O'Neill (2019).