The main deck on the B744 would be best, either 14EF or 20EF or 22EF if available.
The seats on the B787 will all be yin yang and you will find it more difficult to look after your 5 year old and baby.
Having your baby on the floor is completely prohibited.