For water only with an ice cube floating in it, the buoyant force occurs due to the the difference in force between the bottom of the ice cube and the top of the ice cube. This difference in force is due to the pressure that accrues due to the depth at the bottom of the ice cube, via the equation $P=\rho g h$, where $h$ is the liquid depth at the bottom of the ice cube.
When the ice cube is floating in water that has a kerosene layer on top of it, it sinks in the kerosene as shown in the posted diagrams. To analyze this situation, it is helpful to make an assumption. For the sake of the derivation, assume that the ice cube is floating with an orientation such that its top and bottom surfaces are horizontal, ensuring that every part of the top surface experiences the same pressure, and every part of the bottom surface experiences the same (higher) pressure.
The following variable definitions apply:
$A_T$ = the area of the top of the ice cube
$A_B$ = the area of the bottom of the ice cube
$h_1$ = the kerosene depth at the top of the ice cube
$h_2$ = the depth of kerosene at the bottom of the kerosene layer
$h_3$ = the depth of water (not kerosene) at the bottom of the ice cube
$P_T$ = the pressure on the top surface of the ice cube
$F_T$ = the force on the top of the ice cube
$P_B$ = the pressure on the bottom of the ice cube
$F_B$ = the force on the bottom of the ice cube
$\rho_k$ = the density of kerosene
$\rho_w$ = the density of water
From these definitions, it is seen that:
$P_T = \rho_k g h_1$
$F_T = \rho_k g h_1 A_T$
$P_B = \rho_k g h_2 + \rho_w g h_3$
$F_B = [\rho_k g h_2 + \rho_w g h_3]A_B$
Assuming that the area of the top of the ice cube equals the area of the bottom of the ice cube, $A_T = A_B = A$. The buoyant force on the ice cube is the difference between the force on the bottom of the ice cube and the force on the top of the ice cube. Thus,
$F_{buoyant} = F_B - F_T = \rho_kgh_2A+ \rho_wgh_3A - \rho_kgh_1A$
$F_{buoyant} = \rho_kg(h_2 - h_1)A + \rho_wgh_3A$
The term $\rho_kg(h_2-h_1)A$ is seen to be the weight of the kerosene that is displaced by the ice cube. The term $\rho_wgh_3A$ is seen to be the weight of the water that is displaced by the ice cube. This means that the buoyant force on the ice cube is the sum of the weight of kerosene and the weight of water that is displaced by the ice cube.
An alternative viewpoint may make this solution more intuitive. With no kerosene layer, the force on the bottom of the ice cube is due to water only. With a kerosene layer, the weight of the kerosene increases the pressure throughout the water column, so the force from the water on the bottom of the ice cube is higher than expected, meaning that the kerosene definitely has an influence on the pressure and force on the bottom of the ice cube, even though the bottom of the ice cube is not in kerosene.