Concept:The condition g(f(x))=2x forces f to be injective. Then count injective functions from A to B with restrictions f(2)=2 and f(4)=4.Explanation:Since 2x is unique for each x, f must be one-one. Total one-one functions from A (5 elements) to B (7 elements) = 7C5×5!=21×120=2520.Subtract those violating f(2)=2 or f(4)=4.Cases: f(2)=2: choose images for remaining 4 from remaining 6: 6C4×4!=15×24=360.Similarly f(4)=4: also 360.Both f(2)=2 and f(4)=4: choose images for remaining 3 from remaining 5: 5C3×3!=10×6=60.By inclusion-exclusion: 2520−(360+360)+60=1860.Answer:1860