This paper proposes a profit maximization problem designed for fixed-route bus operations, optimizing two key variables: distance-based fares and headways. This study formulates a profit maximization problem while considering the dynamic nature of transit ridership influenced by various demand elasticities. The elasticity of demand is modeled using parameters such as onboard time, waiting time, and fare. Three primary constraints are considered: (1) a financial constraint ensuring the profit (including government subsidy) is non-negative, (2) a demand constraint that ensures actual demand is non-negative (i.e., elastic demand function value is between zero and one, and (3) a maximum headway constraint that limits passenger waiting times to half the headway duration, so that no passengers wait more than one bus. Notably, this research goes beyond the existing literature, which predominantly focuses on average fares, by exploring the implications of a distance-based (user-based) fare structure. A genetic algorithm is used to find solutions. The study employs numerical analyses to verify the solution method and conducts sensitivity analyses on critical input parameters. This study is suitable for one time block (e.g., multiple hours) for a steady demand, and can be extended into multiple time periods to reflect demand changes with the time of day.