Different terminals, BA arrives into KLIA and Air Asia operates from the newly built KLIA2 [LCC terminal]
They are however connected by direct train link [KL Ekspres/KL Transit; cost is RM2 between terminals]
Ideally you want to make check in for Air Asia before 18:40 to make it comfortably.
Check in online before you leave LHR for the Air Asia flight, and then you just need to do bag drop at KLIA2 and clear immigration again. All fairly straight forward.
If your inbound BA flight isn't late I'd say this is highly possible to do this.