In my unit 1 exam i got a B can i still get an A overall with my unit 2 results
Well, we don't know what subject you're referring to, what exam board or even what qualification - so it's difficult to write with authority.
However, in general, yes. Suppose you were 2 marks under the A/B boundary for unit 1. You just need to be 2 marks over that same boundary for unit 2 to get an A overall. (Assuming both units are equally weighted, that is.)
Thanks for that. The specification for WJEC GCSE in Biology (here) confirms that Unit 1 and Unit 2 are equally weighted, and contribute 90% of the overall GCSE mark between them (with Unit 3, Practical Assessment, contributing the final 10%).
This confirms that what I have said above is accurate. If you're X% under the A/B boundary in Unit 1, you just need to be X% over the A/B boundary in Unit 2 to get the A overall.