Ten years from now, A will be twice as old as B. Five years ago, A was three times as old as B. What are the present ages of A and B?