Spreadsheets can either have values or formulae in a cell, not both. So if D already contains data, what you are asking can't be done directly.
You would need to use a helper column containing the formula. Something along the lines of 'IF E contains
boy THEN this cell = the value in D with
boy appended; ELSE this cell = the value in D'. Depending on exactly what you need, you may have to manipulate the results.
If D is empty, then it can be done directly in D. In either case the exact formula will depend on several things.
1. Is the value you are matching case insensitive?
2. If appending to D, is there any other text needed, e.g. a space separating the appended data?
3. Is the appended data to be exactly the same as what is found in respect of case?
4. Is the search value always going to be Boy?
Possibly there are other things I've not considered!
If you are new to spreadsheets, you may find the following to be useful resources.
[Tutorial] Ten concepts that every Calc user should knowOpenOffice Spreadsheet Tutorial for Beginners with Examples[Tutorial] Absolute, relative and mixed references