Do you mean something like
or maybe with the ester the other way around.
Reaction of an appropriately substituted benzonitrile (benzyl nitrile would have an extra CH
2 between the ring and the nitrile) with an appropriate pentylbenzene would give your initial compound - maybe with 4-cyanobenzeneboronic acid and 1-bromo-4-pentylbenzene in a Suzuki?
As to the ester - look into classical ways of generating these