In this paper, we study nonlocal problems for a fractional diffusion equation and a degenerate hyperbolic equation with singular coefficients in the lower terms. The uniqueness of the solution to the problem is proved by the method of energy integrals. The existence of a solution is equivalently reduced to the question of the solvability of Volterra integral equations of the second kind and a fractional differential equation. For a particular solution of the proposed problem, its visualization is carried out for various values of the order of the fractional derivative. It is shown that the order of the derivative affects the intensity of the diffusion process (subdiffusion), as well as the shape of the wave front.