Applying direct variation formula