Calculating colour temperature from two sources of varying luminous intensity
LEDs do not emit black-body (Planckian) radiation which has a specific spectrum, so instead of color temperature which concerns black-body radiators we have to resort to correlated color temperature (CCT). It is the temperature of a black body that emits light of a color that is perceptually closest to the color of light of the same brightness from, in this case, the LEDs. The CIE 1960 $(u,v)$ chromaticity space ignores brightness and is designed to be perceptually uniform. It is used to calculate correlated color temperature and is based on the CIE 1931 $(X, Y, Z)$ color space.

Your LED datasheet gives for the two LED types their nominal fluxes in lumens and also gives their CIE 1931 $(x, y)$ chromaticities. Flux in lumens is calculated from a light spectrum using the CIE 1924 photopic (normal color vision, not low-light) luminosity function which is identical to the CIE 1931 spectral efficiency for the $Y$ color component, by definition. So we can work with normalized $(X, Y, Z)$ color where $Y$ equals the flux in lumens. This normalization is compatible between LED types of different chromaticities. Knowing $Y$ and the chromaticity $(x, y)$, we can easily calculate the rest of the $(X, Y, Z)$ triplet describing a LED type's light color, using the CIE 1931 definitions of $x$ and $y$:


  $$x = \frac{X}{X+Y+Z},\quad y = \frac{Y}{X+Y+Z}\tag{1}$$


$$\Rightarrow\quad X = \frac{Y\,x}{y},\quad Z = \frac{(1 - x - y)\,Y}{y}.\tag{2}$$

The $(X, Y, Z)$ color space is a linear-intensity color space so the $(X, Y, Z)$ colors of the LEDs sum additively in additive mixing of their lights. The correlated color temperature is then calculated from the summed $(X, Y, Z)$ color by going back to $(x, y)$ using the above definitions and by converting to CIE 1960 $(u, v)$ by the definition of that chromaticity space in relation to CIE 1931 chromaticity:


  $$u = \frac{4x}{12y - 2x + 3},\quad v = \frac{6y}{12y - 2x + 3}.\tag{3}$$


These steps could also be combined to a single equation. What remains to do is to find the temperature of a black-body that gives $(u, v)$ coordinates (Planckian locus) nearest to this point by straight-line distance. Krystek, M. (1985), An algorithm to calculate correlated colour temperature. Color Res. Appl., 10: 38-40 recommends using a bisection search together with the following rational Chebyshev approximation valid for $1000 &lt; T &lt; 15000$ where $T$ is temperature in kelvins:


  $$\begin{eqnarray}u = \frac{0.860117757+1.54118254 \times 10^{-4}T + 1.28641212 \times 10^{-7} T^2}{1+8.42420235 \times 10^{-4}T + 7.08145163 \times 10^{-7}T^2},\\
v=\frac{0.317398726+4.22806245 \times 10^{-5}T + 4.20481691 \times 10^{-8} T^2}{1-2.89741816 \times 10^{-5}T+1.61456053 \times 10^{-7}T^2}.\end{eqnarray}\tag{4}$$


The Colour package (install using pip install colour-science) for Python includes the Krystek 1985 method but I just found a bug in their implementation in version 0.3.14 which will be fixed in version 0.3.15. They also have other similar methods in function uv_to_CCT and in other related functions. Example:

import numpy as np
import colour

# Subscript 0 denotes 1800K LED, 1 denotes 4000K LED.
# LED chromaticity center point:
xy_0 = np.array([0.5656, 0.4136])
xy_1 = np.array([0.3860, 0.3870])
# LED nominal flux (lumens) at nominal forward current:
flux_0 = 825
flux_1 = 1370
# Mixing weight (lumens)
weight_0 = flux_0
weight_1 = flux_1

# Proportional XYZ color at flux of 1 lumen (setting Y = 1):
XYZ_0 = np.array([xy_0[0]/xy_0[1], 1, (1 - xy_0[0] - xy_0[1])/xy_0[1]])
XYZ_1 = np.array([xy_1[0]/xy_1[1], 1, (1 - xy_1[0] - xy_1[1])/xy_1[1]])

# Correlated color temperatures of the two LED types
cct_0 = colour.xy_to_CCT(colour.XYZ_to_xy(XYZ_0), method='McCamy 1992')
cct_1 = colour.xy_to_CCT(colour.XYZ_to_xy(XYZ_1), method='McCamy 1992')

# Correlated color temperature of a mixture of the two LED types each at nominal current
colour.xy_to_CCT(colour.XYZ_to_xy(weight_0*XYZ_0 + weight_1*XYZ_1), method='McCamy 1992')


The obtained correlated color temperatures of the two LED types are 1746 and 3934 kelvins, close to their nominal CCTs of 1800 K and 4000 K. At nominal forward current for each LED type, the CCT of the mixture is 2715 kelvins. So the script seems to be working as intended.

We can also get a color temperature curve as function of mixing ratio, and see that it is not exactly linear, although this depends on the definition of a mixing ratio. Continuing in Python:

import matplotlib.pyplot as plt

ccts = np.zeros(101)
for percent_1 in range(101):
    weight_0 = (100-percent_1)*flux_0/100
    weight_1 = percent_1*flux_1/100
    ccts[percent_1] = colour.xy_to_CCT(colour.XYZ_to_xy(weight_0*XYZ_0 + weight_1*XYZ_1), method='McCamy 1992')

plt.plot(range(101), ccts, "-", range(101), cct_0*(100 - np.arange(101))/100 + cct_1*np.arange(101)/100, "--")
plt.ylabel("correlated color temperature (K)")
plt.xlabel("4000 K LED flux / nominal flux (%)")
plt.grid()
plt.show()


Figure 1. Correlated color temperature (solid blue) of a mixture of 1800 K and 4000 K LED types at different mixing ratios. 0 % and 100 % mean a single LED type operating at its nominal flux at its nominal forward current and the other LED type off. 50 % means each LED type is operating at half of its nominal flux. Calculations use manufacturer's LED data. A linear relation (dashed orange) is shown for comparison.