Given a continuous strictly monotonic real-valued function α, defined on an interval I, and a function ω : I → (0, +∞) we denote by Bαω the Bajraktarević mean generated by α and weighted by ω:
B_\omega ^\alpha \left({x,y} \right) = {\alpha ^{- 1}}\left({{{\omega \left(x \right)} \over {\omega \left(x \right) + \omega \left(y \right)}}\alpha \left(x \right) + {{\omega \left(y \right)} \over {\omega \left(x \right) + \omega \left(y \right)}}\alpha \left(y \right)} \right),\,\,\,x,y \in I.
We find a necessary integral formula for all possible three times differentiable solutions (φ, ψ) of the functional equation
r\left(x \right)B_s^\varphi \left({x,y} \right) + r\left(y \right)B_t^\psi \left({x,y} \right) = r\left(x \right)x + r\left(y \right)y,
where r, s, t : I → (0, +∞) are three times differentiable functions and the first derivatives of φ, ψ and r do not vanish. However, we show that not every pair (φ, ψ) given by the found formula actually satisfies the above equation.