On a Dirichlet Problem with Generalized p(x)-Laplacian and Some Applications