I read somewhere that given two languages $A$ and $B$, if $A \le_{log} B$$A \le_{\log} B$, then $A \le_P B$ (with $\le_{log}$$\le_{\log}$ the log-space reduction and $\le_P$ the polynomial time reduction), but I'm not sure about the proof.
Could someone help me with that please.