I150 and H4 EAD

Can I140 be filed in the first year of H1b? How long can it take H4 to get EAD after H1 b starts working in the USA?

PERM (I-140) is a future permanent (green card) job and sponsoring employer can apply on behlf of the beneficiary even if the beneficiary do not have H1B and do not work for the sponsoring employer at the time of applying the PERM.
That said, your H1B employer can apply for PERM on the very first of joining the H1B job.

Once I-140 is approved for primary H1B, H4 dependent can apply for EAD. Generally it takes 4 to 6 months to get EAD depending on the USCIS processing center.