Electronic and optical properties of MAPbI(2)Cl/RbPbI3, MAPbI(2)Cl/RbSnI3 and MAPbI(3)/RbSnI2Cl heterostructures (MA=CH3NH3), were studied by first principle approach. Our calculations show that the MAPbI(3)/RbSnI2Cl and MAPbI(2)Cl/RbSnI3 structures have semiconductor properties with gaps of 0.19 and 0.97 eV, respectively. The effective masses calculations show that the MAPbI(2)Cl/RbSnI3 and MAPbI(3)/RbSnI2Cl can be used in photovoltaic devices. Also, the partial density of energy states (PDOS) diagrams show that in structure of MAPbI(3)/RbSnI2Cl, the two-dimensional electron gas is formed at the junction. In the following, by plotting the changes in the length of anion-cation bonds in the z direction and analyzing the local distribution of electrical potential surfaces, a ferroelectric-like behavior can be seen in the MAPbI(2)Cl/RbSnI3 and MAPbI(3)/RbSnI2Cl structures. Finally, in all cases, the reflectivity functions have large values and behave similar to shiny metals. Also, both MAPbI(2)Cl/RbSnI3 and MAPbI(3)/RbSnI2Cl heterostructures have absorption peaks in the visible range that are located at 412 and 701 nm, respectively.