Optimal boundary control problems for a hierarchical age-structured two-species model